a Few NPC Problems.

Zordon

Golden Oldie
Golden Oldie
Apr 26, 2008
1,176
20
145
Manchester, UK
Ok I have a few NPC Problems.

1.) I have a teleportanywhere function set up thats accessed by a few npc's via the #CALL command.

The problem is when I tried using it earlier it crashed my server. I clicked to go the teleportanwhere function on a few npc's and each time It crashed.

2nd problem is that for some reason, the teleport options to go to Bichon, Prajna, Sabuk, PhantomForest and DesertMudWall on this keep saying missing command #SAY on cd.exe, yet #SAY is on all of these bits of the script. Bit weird but no matter where I put the #SAY it still says it is missing.

2.) My special repair all npc is taking only 1 gold. Checked a few posts done it exactly as chimera said to in one post but doesn't take the right amount of gold.

3.) I've made a short quest to tie in with a new map, the npc works fine up until the bit of the scipt where I want it to teleport me to the map and check for other users and check that the relevant boss is alive or dead, i click and nothing happens.

4.) I've got a PotUnbundle npc set up, it gives pots even if you don't have the bundle in your bag, no idea why, checked and rechecked the script and can't see what is wrong.

any help with these problems is most appreciated.
 
Last edited:

mapadale

Guest
Ok I have a few NPC Problems.

1.) I have a teleportanywhere function set up thats accessed by a few npc's via the #CALL command.

The problem is when I tried using it earlier it crashed my server. I clicked to go the teleportanwhere function on a few npc's and each time It crashed.

2nd problem is that for some reason, the teleport options to go to Bichon, Prajna, Sabuk, PhantomForest and DesertMudWall on this keep saying missing command #SAY on cd.exe, yet #SAY is on all of these bits of the script. Bit weird but no matter where I put the #SAY it still says it is missing.

2.) My special repair all npc is taking only 1 gold. Checked a few posts done it exactly as chimera said to in one post but doesn't take the right amount of gold.

3.) I've made a short quest to tie in with a new map, the npc works fine up until the bit of the scipt where I want it to teleport me to the map and check for other users and check that the relevant boss is alive or dead, i click and nothing happens.

4.) I've got a PotUnbundle npc set up, it gives pots even if you don't have the bundle in your bag, no idea why, checked and rechecked the script and can't see what is wrong.

any help with these problems is most appreciated.
Please post screen shot of CD where it tells you the #SAY is missing, as 9/10 times it says somthing else after as well.
 
Upvote 0

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,966
110
310
Stoke, UK
1)

Teleporter.txt

Code:
[@Towns]
<Bichon /@movebichon>\
<Prajna/ @moveprajna>\
<PhantomForest /@movephantomforest>\
<Sabuk /@movesabuk>\
<DesertMudWall /@movedesertmudwall>\

Code:
[@privateRooms]
<PrivateRoom1/@Room1>\
<PrivateRoom2/@Room2>\
<PrivateRoom3/@Room3>\
<PrivateRoom4/@Room4>\
<PrivateRoom5/@Room5>\
<exit/@exit>\

Both missing #SAY

With the crashing of the server its usually an endless loop it finds.. i.e.

Code:
[@No1]
#ACT
Goto @No2

[@No2]
#ACT
Goto @No1

Will crash the server..

------------------

2) You cannot use D10, there is a Special Repair script posted on here somewhere, use that one.

------------------

3) Put some #ELSESAY's in so that it will tell you whats happening.. also split down the checks so you can find out which one is failing.

------------------

4)

Code:
[@HPBundleS]
#IF
checkitem (HP)Bundle(S)
checkgold 10000
#ELSESAY
For being So cheeky I have taken 100000 gold off you!!\
<Gee Thanks!!/@Exit>\
#ACT
take (HP)Bundle(S)
give HPPotion(S) 300
take gold 10000
#SAY
Here are your pots.\
<Thanks/@exit>\
#elseact
Take gold 100000

Try putting a quantity in against what you are checking and what you are taking.. i.e.

#IF
CheckItem (HP)Bundle(S) 1
#ACT
Take (HP)Bundle(S) 1

Also, try to get some structure in your scripts.. i.e.

#IF
#ACT
#SAY
#ELSEACT
#ELSESAY

If you always do them in the same order each time it will help you to visualise what is going on.


Hope that helps..
 
Upvote 0

Zordon

Golden Oldie
Golden Oldie
Apr 26, 2008
1,176
20
145
Manchester, UK
3) Put some #ELSESAY's in so that it will tell you whats happening.. also split down the checks so you can find out which one is failing.

here is my revised script. Any better do you think?

Get this error when i check it with Script editor.

[Fehler in Line : 42 - 56 ] Unbeendete Function !! In Function : [@continue3]

I tried putting the #elsesay after the #if to see if it worked any better. Not sure what way works best but I've found some scripts only work that way around :S
 
Last edited:
Upvote 0

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,966
110
310
Stoke, UK
Code:
[@continue3]
#IF
checkitem SantasScroll
checkhorse 1
!CheckRiding
checkgold 1990000000
goto @horse1
checkhorse 2
goto @horse2
checkhorse 3
goto @horse3
checkhorse 4
checkgold 1980000000
goto @horse4

You have Goto commands in a #IF section, they should be #ACT's
 
Upvote 0

Zordon

Golden Oldie
Golden Oldie
Apr 26, 2008
1,176
20
145
Manchester, UK
ah thought i had done it wrong just wasn't sure where/how i had. thanks, think i have it sorted now. thanks for the help with fixing the server crashes, been getting them for a while and couldn't figure it out. now i know what causes them been able to fix about 7-8 scripts so far so it doesn't happen.
 
Upvote 0