plebpl
Posts : 2 Join date : 2008-05-29
| Subject: Applying for scripter Fri May 30, 2008 9:42 am | |
| i am fairly good at scripting a very simple untested spell shop script below - Code:
-
Function Main() Player = Actor()
A = OpenDialog(Player, Target, "Spell Shop") DialogOutput(Player, A, "This is where you can buy any spells you desire", 0, 0, 255) SpellBuy = DialogInput(Player, A, "Heal Spell", "Speed Spell", "Nothing") If(SpellBuy == 1 && Gold(Player) > 10) ChangeGold(Player) - 10 AddAbility(Player, "Heal Spell", 1) ElseIf(SpellBuy == 2 && Gold(Player) > 10) ChangeGold(Player) - 10 AddAbility(Player, "Speed Spell", 1) ElseIf(SpellBuy == 3) DialogOutput(Player, A, "Thank you and remember come again to increse your ability", 0, 0, 255) CloseDialog(Player, A)
Else Output(Player, "Sorry you do not have enough gold", 0, 0, 255)
Return() End Function
| |
|
towcar
Posts : 160 Join date : 2008-05-09 Location : Home
| Subject: Re: Applying for scripter Fri May 30, 2008 3:57 pm | |
| Oh cool Some more good work | |
|
Mad_computer_user Admin
Posts : 155 Join date : 2008-04-13 Location : NZ
| Subject: Re: Applying for scripter Fri May 30, 2008 4:32 pm | |
| please use the form in MUST READ section | |
|
Mad_computer_user Admin
Posts : 155 Join date : 2008-04-13 Location : NZ
| Subject: Re: Applying for scripter Fri May 30, 2008 4:34 pm | |
| | |
|
bloobat
Posts : 75 Join date : 2008-04-21
| Subject: Re: Applying for scripter Sat May 31, 2008 12:31 pm | |
| - plebpl wrote:
- i am fairly good at scripting a very simple untested spell shop script below
- Code:
-
Function Main() Player = Actor()
A = OpenDialog(Player, Target, "Spell Shop") DialogOutput(Player, A, "This is where you can buy any spells you desire", 0, 0, 255) SpellBuy = DialogInput(Player, A, "Heal Spell", "Speed Spell", "Nothing") If(SpellBuy == 1 && Gold(Player) > 10) ChangeGold(Player) - 10 AddAbility(Player, "Heal Spell", 1) ElseIf(SpellBuy == 2 && Gold(Player) > 10) ChangeGold(Player) - 10 AddAbility(Player, "Speed Spell", 1) ElseIf(SpellBuy == 3) DialogOutput(Player, A, "Thank you and remember come again to increse your ability", 0, 0, 255) CloseDialog(Player, A)
Else Output(Player, "Sorry you do not have enough gold", 0, 0, 255)
Return() End Function
Not to be mean but... Change the "&&" to +$ A word of advice when it comes to scripting otherwise your script will crash. Plus there are some errors in there, use your server log to find them. | |
|
Sponsored content
| Subject: Re: Applying for scripter | |
| |
|