Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Closed Thread
 
Thread Tools Search this Thread Display Modes
  #16  
Old 06-18-2004, 09:58 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Quote:
Originally Posted by Malinko
Classic still uses toweapons right? Since they have no NPC Server. N-Pulse did use it til we converted it all.
I think Classic get an NPC-Server, or its debug server,
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
  #17  
Old 06-19-2004, 12:02 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
addweapon never works for me. I have tried tons of things. i do exactly what u r supposed to
[/code]
if (actionserverside) {addweapon wepname;}
//#CLIENTSIDE
if (playertouchsme) {triggeraction 0,0,serverside,}
[\code]
yet it never works. I dont know what I am going to do for my server. also for some reason offline it dont even recognize addweapon. It says its not a valid command. And usually offline it knows online commands......
  #18  
Old 06-19-2004, 12:23 AM
Xecutor Xecutor is offline
Former UN Manager
Join Date: Apr 2004
Posts: 117
Xecutor is on a distinguished road
Since your a beginner, just try addweapon weaponname; serversided. Make sure you have the weapon in your weaponslist. The command is not recoginized offline because the offline client does not recognize some (if not all) commands that require an NPC server.
  #19  
Old 06-19-2004, 12:25 AM
xManiamaNx xManiamaNx is offline
Supreme Dictator
xManiamaNx's Avatar
Join Date: Nov 2002
Location: 127.0.0.1
Posts: 385
xManiamaNx is on a distinguished road
Send a message via MSN to xManiamaNx Send a message via Yahoo to xManiamaNx
falco21954368743698340,
Having triggeraction trigger to an x and y of 0 should only be used in WEAPONS.

All serverside:
if (playertouchsme) { addweapon wepname; }
Clientside junk shouldn't be used if all your are doing is adding a weapon when the player touches it.

The "Test" button on the offline editor hasn't been updated in ages. Most new commands it has never heard of. addweapon will not work offline, because there is no offline NPC-Server.
__________________
Maniaman

Play Maloria Now: [2.3] [3]
Maloria Website

  #20  
Old 06-19-2004, 01:33 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
thank you all for your help
  #21  
Old 06-19-2004, 01:38 AM
Ris Ris is offline
Registered User
Join Date: May 2004
Location: California,USA
Posts: 2
Ris is on a distinguished road
hmm well if you wanted to make it easyer on you then that instead of putting it on a level you could just put this in the Control-NPC thing just add
NPC Code:
if (!hasweapon(-narf narf)) addweapon -narf narf;

__________________
Experimenting~
  #22  
Old 06-19-2004, 01:57 AM
xManiamaNx xManiamaNx is offline
Supreme Dictator
xManiamaNx's Avatar
Join Date: Nov 2002
Location: 127.0.0.1
Posts: 385
xManiamaNx is on a distinguished road
Send a message via MSN to xManiamaNx Send a message via Yahoo to xManiamaNx
Quote:
Originally Posted by Ris
NPC Code:
if (!hasweapon(-narf narf)) addweapon -narf narf;

Not good in the control npc for anything besides System NPCs
__________________
Maniaman

Play Maloria Now: [2.3] [3]
Maloria Website

  #23  
Old 06-19-2004, 04:07 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
yeh this is for setlevel2 but for some reason i cant get it to work if not in a wepon?

things like

if (actionserverside) {setlevel2 theplace.nw,2234,7980}
//clientw/e
if (weaponfired) {triggeraction 0,0,serverside,wepon}



but something like

if (actionserverside) {setlevel2 theotherplace.nw,3,-10}
//#CLIENTSIDE
if (w/e) {triggeraction 0,0,serverside,}



wont work (i kno the x and y in both are not able to work)

anyone know why?
  #24  
Old 06-19-2004, 04:14 AM
xManiamaNx xManiamaNx is offline
Supreme Dictator
xManiamaNx's Avatar
Join Date: Nov 2002
Location: 127.0.0.1
Posts: 385
xManiamaNx is on a distinguished road
Send a message via MSN to xManiamaNx Send a message via Yahoo to xManiamaNx
Use actual scripts instead of junk like "if (w/e)" and stuff and then I'll help.
__________________
Maniaman

Play Maloria Now: [2.3] [3]
Maloria Website

  #25  
Old 06-19-2004, 04:18 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
OK

NPC Code:

if (actionserverside) {
setlevel2 class.nw,30,30}
//#CLIENTSIDE
if (command) {triggeraction 0,0,serverside,}


wont work
NPC Code:

if (actionserverside) {
setlevel2 class.nw,30,30}
//#CLIENTSIDE
if (weaponfired) {triggeraction 0,0,serverside,warper}



will
  #26  
Old 06-19-2004, 04:18 AM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Quote:
Originally Posted by falco10291029
yeh this is for setlevel2 but for some reason i cant get it to work if not in a wepon?

things like

if (actionserverside) {setlevel2 theplace.nw,2234,7980}
//clientw/e
if (weaponfired) {triggeraction 0,0,serverside,wepon}



but something like

if (actionserverside) {setlevel2 theotherplace.nw,3,-10}
//#CLIENTSIDE
if (w/e) {triggeraction 0,0,serverside,}



wont work (i kno the x and y in both are not able to work)

anyone know why?
You keep confusing yourself. Try reading this or the moderators will not be happy with you; (http://forums.graal2001.com/forums/s...ad.php?t=53241)

Your triggeraction is missing the weapon name and the parameter. (if there is no parameter, just let it empty). Something similiar to:

NPC Code:

if(actionserverside){
setlevel2 level.nw,30,30;
}

//#CLIENTSIDE

if(weaponfired){
triggeraction 0,0,serverside,WARPER,;
}



Make sure to replace WARPER by the name of the weapon; also you're missing the ; in the end of every execution line.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
  #27  
Old 06-19-2004, 04:19 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
i mean it doesnt work if its not a wepon, what do you do then?
  #28  
Old 06-19-2004, 04:23 AM
xManiamaNx xManiamaNx is offline
Supreme Dictator
xManiamaNx's Avatar
Join Date: Nov 2002
Location: 127.0.0.1
Posts: 385
xManiamaNx is on a distinguished road
Send a message via MSN to xManiamaNx Send a message via Yahoo to xManiamaNx
Since it's not a weapon you are triggering the action to the x of 0 and y of 0, not the npc's x and y. Also, end EVERY command with a ;
__________________
Maniaman

Play Maloria Now: [2.3] [3]
Maloria Website

  #29  
Old 06-19-2004, 04:24 AM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Quote:
Originally Posted by falco10291029
i mean it doesnt work if its not a wepon, what do you do then?
If it is a local npc (npc on level) just use setlevel2 serverside too.

NPC Code:

if(playertouchsme){
setlevel2 level.nw,30,30;
}

//#CLIENTSIDE

if(created) setimg block.png;




Is that what you're looking for?
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
  #30  
Old 06-19-2004, 04:27 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
ok so for a command thats not a weapon itll look like:

NPC Code:

if (actionserverside) setlevel2 class.nw,30,30;
//#CLIENTSIDE
if (flag) {triggeraction x,y,serverside,}

Closed Thread


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:36 AM.


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