Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Npc problems... (https://forums.graalonline.com/forums/showthread.php?t=50107)

Fhqwhgads 01-03-2004 02:34 AM

Npc problems...
 
Ok, here's my problem. When I make a shop, and npc's that you can buy, it works perfect in offline mode, like you can buy the npc, and it works too. But when I upload it online, you can't buy it, and even if you add it throught the RC, it still doesn't do anything. Should i put something like //#CLIENTSIDE before the script or something? I'm having the same problem with warprings. The animation plays, but it doesnt warp you even though i put the
Quote:

setlevel2 filename,x,y;
in. So can someone please help me out with that? I would really appreciate it! :)

Spark910 01-03-2004 02:49 AM

online, using NPC server, you use:

NPC Code:
addweapon <name>;



and the NPC code in the NPC Server weapon list, so don't use toweapons if you are.

Loriel 01-03-2004 03:14 AM

Re: Npc problems...
 
setlevel2 must be serverside, not clientside.

xManiamaNx 01-03-2004 03:16 AM

As Loriel said, setlevel2 is serverside only.

As for the shop, if you have a npcserver, the weapon must be in the npc weapon list, and you must use addweapon <weaponname> (addweapon is also serverside only)

tlf288 01-03-2004 03:33 AM

1 Attachment(s)
it neems like you don't quite understand the npc-server. i suggest reading the document i have attached. although it doesn't have the most updated information, it should give you an understanding of what the npc-server is and how it works.

Fhqwhgads 01-03-2004 04:07 AM

thanks everyone! Yeah, im not the manager or anything, so i dont really know the npc-server. Im fairly new to graal too, maybe few hundred hours of combined time. The weapons are already on the list, so thats the same. As for the set level, do you like put //#SERVERSIDE before the setlevel index,x,y? or before the whole script? Oh and addweapon name; says its an unknown command. If you do it, it just takes money, and doesnt add anything. Oh and what about the warprings?

Lance 01-03-2004 04:20 AM

//#CLIENTSIDE in a script is a divider.

Code above it is dealt with by the server.
Code below it is dealt with by the client.

For this reason, there exists no //#SERVERSIDE.

tlf288 01-03-2004 04:47 AM

Quote:

Originally posted by Fhqwhgads
do you like put //#SERVERSIDE before the setlevel index,x,y?

Oh and addweapon name; says its an unknown command.

Oh and what about the warprings?

as lance said, no.

it is an unknown command, to the client. if the addweapon command is being called serverside, it will work the way it is designed to.

what about 'em? i think loriel answered your question.

Loriel 01-03-2004 10:51 AM

I think you are having trouble coordinating the clientside parts of your script with the supposed-to-be-serverside setlevel2... ?

dlang 01-03-2004 02:39 PM

Quote:

Originally posted by xManiamaNx
As for the shop, if you have a npcserver, the weapon must be in the npc weapon list, and you must use addweapon <weaponname> (addweapon is also serverside only)
addweapon is not serverside only.
Note by Loriel: This is not true.

osrs 01-03-2004 04:38 PM

Quote:

Originally posted by dlang
addweapon is not serverside only.
I'll give you a gift if you add it client-side. (without triggeraction)

Fhqwhgads 01-04-2004 07:32 PM

ok, heres the script, whats wrong with it?
----------------------------------------------------

//#CLIENTSIDE
if (playerenters&&!hasweapon(Town Main Warp)) {show;
}
if (playerenters&&hasweapon(Town Main Warp)) {hide;
}
if (playertouchsme) {
toweapons Town Main Warp;
hide;
}
if (weaponfired&&!strequals(#L,serverstart.graal)) {
freezeplayer 1.5;
playerdir=2;
sleep .05;
playery=playery-.1;
playerdir=3;
sleep .05;
playery=playery-.1;
playerdir=0;
sleep .05;
playery=playery-.1;
playerdir=1;
sleep .05;
playery=playery-.1;
playerdir=2;
sleep .05;
playery=playery-.1;
playerdir=3;
sleep .05;
playery=playery-.1;
playerdir=0;
sleep .05;
playery=playery-.1;
playerdir=1;
sleep .05;
playery=playery-.1;
playerdir=2;
sleep .05;
playery=playery-.1;
playerdir=3;
sleep .05;
playery=playery-.1;
playerdir=0;
sleep .05;
playery=playery-.1;
playerdir=1;
sleep .05;
playery=playery-.1;
playerdir=2;
sleep .05;
playery=playery-.1;
playerdir=3;
sleep .05;
playery=playery-.1;
playerdir=0;
sleep .05;
playery=playery-.1;
playerdir=1;
sleep .05;
playery=playery-.1;
playerdir=2;
sleep .05;
playery=playery-.1;
playerdir=3;
sleep .05;
playery=playery-.1;
playerdir=0;
sleep .05;
playery=playery-.1;
playerdir=1;
sleep .05;
playery=playery-.1;
playerdir=2;
sleep .05;
playery=playery-.1;
playerdir=3;
sleep .05;
playery=playery-.1;
playerdir=0;
sleep .05;
playery=playery-.1;
playerdir=1;
sleep .05;
playery=playery-.1;
playerdir=2;
}
//#SERVERSIDE
setlevel2 serverstart.graal;

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

Python523 01-04-2004 07:45 PM

oh dear GOD

Read -> Think -> Think some more -> Reread -> Think about what you read -> Post, we've already said //#SERVERSIDE doesn't exist

D1ce2 01-04-2004 07:49 PM

Quote:

Originally posted by Fhqwhgads
ok, heres the script, whats wrong with it?
----------------------------------------------------

Quote removed for the sake of readability -Loriel

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

That should be okay i think.

Fhqwhgads 01-04-2004 07:55 PM

it just doesnt warp... it does the ani but doesnt warp... cant figure it out :confused:


All times are GMT +2. The time now is 04:49 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.