Script Blacksmith (Forgeron)
Page 1 sur 1
Script Blacksmith (Forgeron)
[quote]
_ Créez un script vierge, et collez le script qui suit, renommez-le forgeron.rsl et placez-le dans \Data\Server Data\Scripts
_ Dans Zone, cliquez sur waypoint mode, selectionnez l'actor à utiliser et selectionner rightClick script, trouvez ce script dans la liste. sauvegardez la zone et tester
COMMENT SCRIPTER AVEC RCCE?
_ Lancez Scriptorama
_ Se référer aux commandes de script
_ Sauvegardez vos script au format .rsl (le format .rcscript est l'ancien, il ne sert plus à rien, vous pouvez les supprimer).
_ Placez vos scripts dans \Data\Server Data\Scripts
_ Pour tester vos scripts sans perdre de temps => Lancez le serveur de RCS, débloquez updates et déconnectez-vous.
Ensuite ouvrez Data\Logs\ et cherchez les erreurs dans SERVER LOGS.TXT, le log vous indiquera le type d’erreur et la ligne. ex:PARSE ERROR est une erreur d'orthographe ou oubli de symbole
_ S'il n'y a aucune erreur signalée dans le log, relancez le serveur et testez en jeu
_ Créez un script vierge, et collez le script qui suit, renommez-le forgeron.rsl et placez-le dans \Data\Server Data\Scripts
_ Dans Zone, cliquez sur waypoint mode, selectionnez l'actor à utiliser et selectionner rightClick script, trouvez ce script dans la liste. sauvegardez la zone et tester
Function Main()
Player = Actor()
D = OpenDialog(Player, ContextActor(), "Your Town Name Simithery!") ;You put the name of the shop here
DialogOutput(Player, D, "Welcome to me shop! And what may I do for you?", 255, 255, 255) ;This is the text leading on to where you player chooses what to buy
Result = DialogInput(Player, D, "Clay Dagger(5 copper)", "Clay Helmet(10 Gold)", "Clay Shield (20 Gold)", "Clay Body plate (58 Gold)", "Clay swords (46 Gold)", "Copper leg plate (20 Gold)", Copper body plate fixed (116 Gold)", Copper Sword fixed (92 Gold)", "Nothing") ;This is all of the things your player can buy!
If (Result == 1) ;This makes sure that you asked for the first thing
If (Gold(Player) > 5) ;This finds out if yo have enough Gold to get it
ChangeGold(Player, -5) ;This takes away the gold if you have it
GiveItem(Player, Clay Dagger, 1) ;This gives the player the item!
Else
DialogOutput(Player, D, "You do not have enough gold!", 255, 255, 255) ;but if you don't have enough gold this happens.
EndIf
ElseIf (Result == 2)
If (Gold(Player) > 10)
ChangeGold(Player, -10)
GiveItem(Player, Clay Helmet, 1)
Else
DialogOutput(Player, D, "You do not have enough gold!", 255, 255, 255)
EndIf
ElseIf (Result == 3)
If (Gold(Player) > 20)
ChangeGold(Player, -20)
GiveItem(Player, Clay Sheld, 1)
Else
DialogOutput(Player, D, "You do not have enough gold!", 255, 255, 255)
EndIf
ElseIf (Result == 4)
If (Gold(Player) > 58)
ChangeGold(Player, -58)
GiveItem(Player, Clay Chest Plate, 1)
EndIf
Else
DialogOutput(Player, D, "You do not have enough gold!", 255, 255, 255)
EndIf
ElseIf (Result == 5)
If (Gold(Player) > 48)
ChangeGold(Player, -48)
GiveItem(Player, Clay Sword, 1)
Else
DialogOutput(Player, D, "You do not have enough gold!", 255, 255, 255)
EndIf
ElseIf (Result == 6)
If (Gold(Player) > 20)
ChangeGold(Player, -20)
GiveItem(Player, Clay Leg Plates, 1)
Else
DialogOutput(Player,D, "You do not have enough gold", 255, 255, 255)
Endif
ElseIf (Result == 7)
If (Gold(Player) > 29)
ChangeGold(Player, -29)
SetItemHealth(Clay Body Plate, +10) ;This puts health onto a dameged item!
Else
DialogOutput(Player,D, "You do not have enough gold!",225, 225, 225)
Endif
ElseIf (Result ==
If (Gold(Player) > 24)
ChangeGold(Player, -24)
SetItemHealth(Clay Sword, +5)
Else
DialogOutput(Player,D, "You do not have enough gold!",225, 225, 225)
Endif
ElseIf(Result == 9)
DialogOutput(Player,D, "Well then stop wastin' me time!",225, 225, 225) ;This is what happens if you ask for nothing.
CloseDialog(Player,D)
Return
End Function
Sujets similaires
» Script de dialogue
» Script AOE (Attaque de zone)
» liste des fonctions de script
» LOGICIEL Scriptorama (Script Editor)
» Script Mining (Extraction de minerai)
» Script AOE (Attaque de zone)
» liste des fonctions de script
» LOGICIEL Scriptorama (Script Editor)
» Script Mining (Extraction de minerai)
Page 1 sur 1
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum
|
|