etho
New Member
Posts: 5
|
Post by etho on Jun 25, 2017 22:14:19 GMT
use the script realmcrafter.wikia.com/wiki/Very_Simple_Shop_ScriptI use this script, the character blocked when clicking on the npc purchase options, the server log it generates this error Script Error: Command 'IFMONEY' not found in Store my script Using "RC_Core.rcm"
; 01:34, March 29, 2017 (UTC)01:34, March 29, 2017 (UTC)~
; By
~~~~~~~~
Function Main()
Player = Actor()
;open the dialog box and Name it "General Store"
D=OpenDialog(Player, D, "General Store")
DialogOutput(Player, D, " Welcome to the General Store, what would you like to buy")
;give the options for the player to buy
choice=DialogInput(Player, D, "Armadura[99]|No Thanks","|")
If choice = 1
;check If the player has enough Money
If (player) > 10
DialogOutput(Player, D, "You have bought item Sword for 10 copper")
;take away the amount the sword costs
ChangeMoney(Player, -10)
;give the player the item, make sure you have an item called whatevers in the ""
GiveItem(Player, "Armadura", 1)
DoEvents(2000)
Else
DialogOutput(Player, D, "You dont have that much money, come back when you do!")
CloseDialog(Player, D)
EndIf
;close the dialog box
CloseDialog(Player, D)
;the following is the same as the above just more Money and different names
ElseIf choice = 2 Then
DoEvents(2000)
CloseDialog(Player, D)
EndIf
End Function
|
|
|
Post by codstre on Feb 27, 2018 2:59:49 GMT
You could also try using the Case, it is faster that ElseIf and is a lot simpler to utilize.
|
|