Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   PlayerWorlds Main Forum (https://forums.graalonline.com/forums/forumdisplay.php?f=15)
-   -   NPCS in playerworlds (https://forums.graalonline.com/forums/showthread.php?t=60233)

excaliber7388 07-28-2005 09:13 PM

NPCS in playerworlds
 
as you all must know i just started a playerworld, Playerworld13, or soon to be Dark Rival
anyway, all the NPCs are messed up. can someone explain why?

Curt1zzle 07-28-2005 10:00 PM

Can we be a bit more detailed?

URBANLEGEND 07-28-2005 10:15 PM

Why didnt you just keep all this **** in one thread? Christ. If you dont know what your doing you shouldn't of bought a playerworld

excaliber7388 07-29-2005 12:41 AM

i do know, and i will point out the fact that this worked flawlesslyy off line, but now the NPCs dont work...ex: Warp Rings do not warp, things do not change zoom or colors, or simply dont follow the script. it shouldn't be so hard just to put this online!

Lance 07-29-2005 12:51 AM

Quote:

Originally Posted by excaliber7388
i do know, and i will point out the fact that this worked flawlesslyy off line, but now the NPCs dont work...ex: Warp Rings do not warp, things do not change zoom or colors, or simply dont follow the script. it shouldn't be so hard just to put this online!

http://ilfirin.org/graal/NPC_Server

excaliber7388 07-29-2005 01:49 AM

that did answer a few things, but the biggest question,now, would be how do i change the colors /size of the NPCs? setcoloreffect and setzoomeffect don't work :\

Zurkiba 07-29-2005 02:08 AM

//#clientside

//#serverside

Lance 07-29-2005 02:14 AM

Quote:

Originally Posted by Zurkiba
//#serverside

No.

excaliber7388 07-29-2005 02:39 PM

hey i figured something out. its playerenters, compusdied,and the warps that don't work, any suggestions?

xAndrewx 07-29-2005 03:03 PM

Hire staff! :-)

excaliber7388 07-30-2005 03:08 AM

i now have the npcs working...i feel like a *****...it was so simple =/ anyway, the only problem is that the warps, or links, between the levels don't warp you. some work, some don't =/ i can't figure out whats wrong there yet. if you have suggestions feel free to help ;) thx!

kenyonandelliot 07-30-2005 06:27 PM

if they don't warp then fix them

Matt 07-30-2005 09:26 PM

Quote:

Originally Posted by excaliber7388
i now have the npcs working...i feel like a *****...it was so simple =/ anyway, the only problem is that the warps, or links, between the levels don't warp you. some work, some don't =/ i can't figure out whats wrong there yet. if you have suggestions feel free to help ;) thx!

Make sure the level that you want the link to warp to is uploaded, and the extension is correct. Meaning if it's .nw put levelnamehere.nw

If you have more questions please feel free to pm me or just setup a support ticket and appoint the ticket to General Questions or Playerworlds.

excaliber7388 07-31-2005 12:12 AM

i have re-uploaded the levels and that usually works, havn't ran into trouble since, but it's mostly the warprings that don't work here's the script im using,
(yes i am using the warper gani, i will be removing it though):
// NPC made by Excaliber
//#CLIENTSIDE
if (playerenters||playertouchsme&&!hasweapon(MainTown )) {toweapons Warp Rings/MainTown;hidelocal;}

if (weaponfired) {setplayerdir 2;seteffect 0,0,0,0;setani warper,;sleep 1;setani warperend,;setlevel2 main1_darkrival2.nw,5,13;}

if (created) {dontblock;
}

its REALLY simple, so i don't get why it doesn't work online, it's perfect offline :\

Polo 07-31-2005 10:23 AM

setlevel2 only works serverside if I remember correctly.

Skyld 07-31-2005 11:39 AM

Obey these rules in all of your code.

excaliber7388 07-31-2005 05:11 PM

ok, what should be used instead of setlevel? or setlevel2?

xAndrewx 07-31-2005 05:57 PM

if (actionserverside){
if (strequals(#p(0),warp)){
setlevel2 #p(1),#p(2),#p(3);
}
}
//#CLIENTSIDE
if (weaponfired){
triggeraction 0,0,serverside,weapon,warp,level,x,y;
}

excaliber7388 07-31-2005 07:17 PM

nope doesn't work theres an error :\

Bl0nkt 07-31-2005 07:22 PM

Quote:

Originally Posted by excaliber7388
nope doesn't work theres an error :\

Change #p(2) to strtofloat(#p(2)). Same goes for #p(3).

Also be sure to change weapon in the triggeraction to the name of the weapon this script is in.

excaliber7388 07-31-2005 08:00 PM

still doesn't work this is the script i am currently using, yes it still has setlevel2 in it, but i can't get the other way to work, whats wrong with it?:
// NPC made by Excaliber (Manager)
//#CLIENTSIDE
if(playerenters){
toweapons Warp Rings/Warper1;
hidelocal}
if(weaponfired){
freezeplayer 2;
play thunder.wav;
setplayerdir 2;
setani drwarp,;
sleep .1;
for (i=0;i<21;i++) {
seteffect i/20,i/20,i/20,i/20;sleep .05}
{sleep 1;
seteffect 0,0,0,0;
setlevel2 warper.nw,31,31;}
}

Lance 07-31-2005 08:15 PM

Quote:

Originally Posted by xAndrewx
if (actionserverside){
if (strequals(#p(0),warp)){
setlevel2 #p(1),#p(2),#p(3);
}
}
//#CLIENTSIDE
if (weaponfired){
triggeraction 0,0,serverside,weapon,warp,level,x,y;
}

For one, you're trying to use strings as vars. For another that is insecure. Don't do this.

excaliber7388 07-31-2005 09:07 PM

yes, but i'm not using that script :D it didn't work well anyway or at least i couldn't figure out how to make it work well whatever i use, it should work with seteffect and a gani, any suggestions? (here's the script again )

// NPC made by Excaliber (Manager)
//#CLIENTSIDE
if(playerenters){
toweapons Warp Rings/Warper1;
hidelocal}
if(weaponfired){
freezeplayer 2;
play thunder.wav;
setplayerdir 2;
setani drwarp,;
sleep .1;
for (i=0;i<21;i++) {
seteffect i/20,i/20,i/20,i/20;sleep .05}
{sleep 1;
seteffect 0,0,0,0;
setlevel2 warper.nw,31,31;}
}

Bl0nkt 08-01-2005 12:05 AM

Quote:

Originally Posted by excaliber7388
yes, but i'm not using that script :D it didn't work well anyway or at least i couldn't figure out how to make it work well whatever i use, it should work with seteffect and a gani, any suggestions? (here's the script again )

// NPC made by Excaliber (Manager)
//#CLIENTSIDE
if(playerenters){
toweapons Warp Rings/Warper1;
hidelocal}
if(weaponfired){
freezeplayer 2;
play thunder.wav;
setplayerdir 2;
setani drwarp,;
sleep .1;
for (i=0;i<21;i++) {
seteffect i/20,i/20,i/20,i/20;sleep .05}
{sleep 1;
seteffect 0,0,0,0;
setlevel2 warper.nw,31,31;}
}

toweapons does not add a weapon to the player. It adds it to NC in RC.

addweapon Warp Rings/Warper1 (From what I understand, addweapon is detected as false offline. Try it on your server.)

excaliber7388 08-05-2005 04:32 PM

still doesn't help :\ is there another way i could warp a person without setlevel2? i think that might be the problem

xAndrewx 08-05-2005 05:37 PM

Quote:

Originally Posted by Lance
For one, you're trying to use strings as vars. For another that is insecure. Don't do this.

Aha, I didn't know that. My mistake.

excaliber7388 08-07-2005 02:11 AM

nvm i figured it out :\

Skyld 08-07-2005 02:06 PM

Quote:

Originally Posted by Bl0nkt
toweapons does not add a weapon to the player. It adds it to NC in RC.

Ideally, this should be removed. Then people might not get it confused.

excaliber7388 08-07-2005 04:04 PM

Quote:

Originally Posted by Bl0nkt
toweapons does not add a weapon to the player. It adds it to NC in RC.

addweapon Warp Rings/Warper1 (From what I understand, addweapon is detected as false offline. Try it on your server.)

Toweapons does give the player the weapon sometimes, and I can't get addweapon to work yet either

Polo 08-07-2005 07:13 PM

Quote:

Originally Posted by excaliber7388
Toweapons does give the player the weapon sometimes, and I can't get addweapon to work yet either

See in RC (Well, NC but meh) the W with a sword over it. hit that and add a weapon. Paste your script for your weapon (warper) in, except for all the toweapons stuff, give it an image file and save it. Now in an npc in your level, you use addweapon the add the weapon you saved earlier to the player. You should really do ALL your weapons and items this way. As it allows you to easily bug fix weapons from RC (NC)

Skyld 08-07-2005 07:40 PM

Quote:

Originally Posted by excaliber7388
Toweapons does give the player the weapon sometimes, and I can't get addweapon to work yet either

toweapons should not be used on a server. Only use it offline for testing.

As for addweapons, it adds a weapon to a player that is already in the Weapons list. It does not add weapons to the list and then to the player. Also, it will only work on the serverside.

excaliber7388 08-08-2005 01:48 AM

hey thanks, as you all might know, i made this entire server (well, most of it) without knowledge of online scripting, and, for the most part, you guys have really helped thanks. If what you say is true, i shouldn't have (too ;)) many more errors, and won't be bothering everyone with so many posts :D i should be done some time this month (testing as well) so look foward to the improved Dark Rival, comming soon. hope to see you all there!


All times are GMT +2. The time now is 10:47 PM.

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