Aegis Support Board: Reset Script - Aegis Support Board

Jump to content

ASB News! ASB 5.0 Beta V2 has now been released!. See here for more Info.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Reset Script

#1 User is offline   KazeShinobi 

  • Member
  • PipPipPip
  • Group: Members
  • Posts: 34
  • Joined: 22-April 05

Posted 19 May 2007 - 12:10 PM

Hi guys

ive been trying to make an reset script
in zone 10.4

the code im using is npc "prontera" "Albert" 4_M_ZONDAOYAJI 150 192 4 5 5
OnClick:
dialog "[Albert]"
dialog "Good Day, my name is Albert, I am one of that manager's of SakuraHeaven."
dialog "My Master as asked me to come here and offer you my services, I am able to assist you in resetting your character skills, stats or both, but for a fee of course."
dialog "Would you like to reset now? The fee is 250,000z each or 400,000z for both."
wait
choose menu "Yes" "No"
case 1
dialog "[Albert]"
dialog "What would you like to reset?"
wait
choose menu "Reset Skills" "Reset Stats" "Both" "Not Interested"
case 1
dialog "[Albert]"
dialog "To reset your skills, the fee is 250,000z"
if ((v[VAR_MONEY] >249999))
dropgold 250000
dialog "[Albert]
dialog "Thank you for your purchase, I will now reset your skills."
ResetSkill
elseif v[VAR_MONEY] < 250000
dialog "I'm sorry, you do not have enough zenny."
endif
close
break
case 2
dialog "[Albert]"
dialog "To reset your stats, the fee is 250,000z"
if ((v[VAR_MONEY] >249999))
dropgold 250000
dialog "[Albert]
dialog "Thank you for your purchase, I will now reset your skills."
ResetStat
elseif v[VAR_MONEY] < 250000
dialog "I'm sorry, you do not have enough zenny."
endif
close
break
case 3
dialog "[Albert]"
dialog "Would you like to reset both stats and skills, the fee is 400,000z"
if ((v[VAR_MONEY] >399999))
dropgold 250000
dialog "[Albert]
dialog "Thank you for your purchase, I will now reset your skills."
ResetStat
elseif v[VAR_MONEY] < 400000
dialog "I'm sorry, you do not have enough zenny."
endif
close
break
case 4
dialog "[Albert]"
dialog "My master said to punish those for wasting my time, TAKE THIS!"
hpheal -85
close
break
endchoose
case 2
dialog "[Albert]"
dialog "Please let me know if you would like to reset in the future, I'll be happy to help any time"
close
break
endchoose

return

however, no matter what i do, the zone keeps failing becuase of it, ive tried just putting in text which works, but for some reason, i cant load any sprites, it wont work the moment i choose a different spr.

Any ideas

Sorry if the coding is bad, it was my first try, from using looking at other scripts as examples.
0

#2 User is offline   fRe4k! 

  • Average Member
  • PipPipPipPip
  • Group: Members
  • Posts: 130
  • Joined: 10-March 03

Posted 19 May 2007 - 04:58 PM

npc "prontera" "Albert" 4_M_ZONDAOYAJI 150 192 4 5 5
OnClick:
	dialog "[Albert]"
	dialog "Good Day, my name is Albert, I am one of that manager's of SakuraHeaven."
	dialog "My Master as asked me to come here and offer you my services, I am able to assist you in resetting your character skills, stats or both, but for a fee of course."
	dialog "Would you like to reset now? The fee is 250,000z each or 400,000z for both."
	wait
	choose menu "Yes" "No" 
	case 1
		dialog "[Albert]"
		dialog "What would you like to reset?"
		wait
		choose menu "Reset Skills" "Reset Stats" "Both" "Not Interested"
		case 1
			dialog "[Albert]"
			dialog "To reset your skills, the fee is 250,000z"
			if ((v[VAR_MONEY] >249999))
				dropgold 250000
				dialog "[Albert]"
				dialog "Thank you for your purchase, I will now reset your skills."
				ResetSkill
			else
				dialog "I'm sorry, you do not have enough zenny."
			endif
			close
			break
		case 2 
			dialog "[Albert]"
			dialog "To reset your stats, the fee is 250,000z"
			if ((v[VAR_MONEY] >249999))
				dropgold 250000
				dialog "[Albert]"
				dialog "Thank you for your purchase, I will now reset your skills."
				ResetStat
			else
				dialog "I'm sorry, you do not have enough zenny."
			endif
			close
			break
		case 3
			dialog "[Albert]"
			dialog "Would you like to reset both stats and skills, the fee is 400,000z"
			if ((v[VAR_MONEY] >399999))
				dropgold 400000
				dialog "[Albert]"
				dialog "Thank you for your purchase, I will now reset your stats and skills."
				ResetStat
				ResetSkill
			else
				dialog "I'm sorry, you do not have enough zenny."
			endif
			close
			break
		case 4
			dialog "[Albert]"
			dialog "My master said to punish those for wasting my time, TAKE THIS!"
			hpdrain 85
			close
			break
		endchoose
	case 2
		dialog "[Albert]"
		dialog "Please let me know if you would like to reset in the future, I'll be happy to help any time"
		close
		break
	endchoose

return


1. You forgot some quotes right after "[Albert].
2. The elseifs were no mistakes, but just redundant.
3. The Part for both Stat&Skillreset was missing the Skillreset.

Edit:
And btw, you can quick-test your scripts via Script_Compile.exe and if errors occur, check the last lines of npc.asm in your /npcdata/ folder.

This post has been edited by fRe4k!: 19 May 2007 - 05:01 PM

0

#3 User is offline   KazeShinobi 

  • Member
  • PipPipPip
  • Group: Members
  • Posts: 34
  • Joined: 22-April 05

Posted 20 May 2007 - 05:48 AM

Thank you very much, the script works beautifully now.

However because i'm still new to this, im still scared about all the types of mistakes you can make, i did the script in notepad studying a few other scripts, but is there an editor that can help you make scripts and tells you about the errors, other than script compile. The server runs on a dedi and i script on my own pc, so hoping there is something that can help speed up the process.

Thank you again for your help.
0

#4 User is offline   KillerCore1984 

  • Member
  • PipPipPip
  • Group: Members
  • Posts: 74
  • Joined: 12-October 04

Posted 20 May 2007 - 10:31 AM

i think most people just use wordpad or something like that. just make sure you make a clean script like freak posted so you can find mistakes faster.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users