Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-10-2008, 04:20 AM
GULTHEX GULTHEX is offline
Registered User
Join Date: Jul 2008
Posts: 148
GULTHEX can only hope to improve
Angry Shop Script Help

PHP Code:
if (playerchats && strequals(#c,buy Hug) && playerrupees >=5)
{
playerrupees-=5;
addweapon Event/Hug;

when i click test in level maker it says this

Error: Unknown command: addweapon Event/Hug
how do i fix or is there a substitute for addweapon???
Reply With Quote
  #2  
Old 09-10-2008, 04:33 AM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
In offline playerworlds, you should use toweapons Event/Hug. It's possible that the level editor doesn't recognize the addweapon command. Just see if it works online.
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote
  #3  
Old 09-10-2008, 04:41 AM
GULTHEX GULTHEX is offline
Registered User
Join Date: Jul 2008
Posts: 148
GULTHEX can only hope to improve
it dont work online thats the prob
Reply With Quote
  #4  
Old 09-10-2008, 05:39 AM
Demisis_P2P Demisis_P2P is offline
Kanto League Champion
Demisis_P2P's Avatar
Join Date: Jan 2005
Posts: 2,357
Demisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud of
You should probably get into the habit of not doing multiple checks on the same line unless they're directly related.

+ try addweapon ("Event/Hug");
It might even be case sensitive, I'm not sure.
__________________
Reply With Quote
  #5  
Old 09-10-2008, 06:01 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by Demisis_P2P View Post
You should probably get into the habit of not doing multiple checks on the same line unless they're directly related.

+ try addweapon ("Event/Hug");
It might even be case sensitive, I'm not sure.
No. That is GS2, GS2 doesn't work offline.

addweapon does not exist offline.

If you're going to test it online then ignore what the level maker says.

I see no reason why that script wouldn't work online on the serverside.
__________________
Reply With Quote
  #6  
Old 09-10-2008, 06:03 AM
Demisis_P2P Demisis_P2P is offline
Kanto League Champion
Demisis_P2P's Avatar
Join Date: Jan 2005
Posts: 2,357
Demisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud of
Quote:
Originally Posted by inverness View Post
no. That is gs2, gs2 doesn't work offline.

Addweapon does not exist offline.

If you're going to test it online then ignore what the level maker says.
Quote:
Originally Posted by gulthex View Post
it dont work online thats the prob
^ ^ ^
__________________
Reply With Quote
  #7  
Old 09-10-2008, 06:05 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by Demisis_P2P View Post
^ ^ ^
The script is fine, he either didn't test it online even though he said he did or hes doing something wrong elsewhere.
__________________
Reply With Quote
  #8  
Old 09-10-2008, 03:48 PM
GULTHEX GULTHEX is offline
Registered User
Join Date: Jul 2008
Posts: 148
GULTHEX can only hope to improve
Lol it dont work at all online
Reply With Quote
  #9  
Old 09-10-2008, 05:02 PM
Crono1508 Crono1508 is offline
*Shadow (Convoy)
Crono1508's Avatar
Join Date: Jun 2004
Location: United States
Posts: 488
Crono1508 will become famous soon enough
Does the NPC even exist in the NC?
__________________

Reply With Quote
  #10  
Old 09-10-2008, 05:04 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by GULTHEX View Post
Lol it dont work at all online
playerchats doesn't work serversided in a weapon NPC, fyi.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #11  
Old 09-10-2008, 05:53 PM
GULTHEX GULTHEX is offline
Registered User
Join Date: Jul 2008
Posts: 148
GULTHEX can only hope to improve
how do i put it in nc???
Reply With Quote
  #12  
Old 09-11-2008, 01:58 AM
Frankie Frankie is offline
xChugxLifex
Frankie's Avatar
Join Date: Feb 2008
Location: New York
Posts: 1,610
Frankie is a jewel in the roughFrankie is a jewel in the rough
Send a message via AIM to Frankie Send a message via MSN to Frankie
there's really no point putting that in NC. just keep it in a level based NPC.
__________________
*Sum41Freeeeek
*Frankie
Reply With Quote
  #13  
Old 08-02-2009, 09:30 PM
[email protected] jamerson61894@yahoo.com is offline
Banned
Join Date: Jul 2008
Posts: 83
jamerson61894@yahoo.com is an unknown quantity at this point
player.addWeapon("WEAPONNAMEHERE");

Only works serverside so make a case and do a triggerserver.
Reply With Quote
  #14  
Old 08-02-2009, 10:45 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by [email protected] View Post
player.addWeapon("WEAPONNAMEHERE");

Only works serverside so make a case and do a triggerserver.
His whole script is serverside. No point in making it clientside, eh?

Anyway, first off, make sure you got the script you posted somewhere in a level npc, not inside a weapon. Also, make sure that the weapon "Event/Hug" actually exists and has got at least a tiny bit of code which fires when the weapon is added, so you know buying it actually worked. If both apply, everything should work fine. If not, you are probably still doing something wrong. Maybe write a more detailed description for us? Or even provide the code of the weapon, might help. All up to you.
Reply With Quote
  #15  
Old 08-02-2009, 11:22 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
I take it you guys didn't realize this thread is quite old? :o
Reply With Quote
  #16  
Old 08-02-2009, 11:34 PM
papajchris papajchris is offline
Zeus Condero
papajchris's Avatar
Join Date: Jan 2006
Location: Michigan
Posts: 1,600
papajchris is a splendid one to beholdpapajchris is a splendid one to beholdpapajchris is a splendid one to beholdpapajchris is a splendid one to behold
Quote:
Originally Posted by Gambet View Post
I take it you guys didn't realize this thread is quite old? :o
Pwnt
__________________
Reply With Quote
  #17  
Old 08-02-2009, 11:46 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Gambet View Post
I take it you guys didn't realize this thread is quite old? :o
Now you mention it I never really pay attention to dates, I just pick my threads from the forums main page..
Reply With Quote
  #18  
Old 08-03-2009, 01:18 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
I scroll up to the top by habit and that does involve checking the date
Reply With Quote
  #19  
Old 08-03-2009, 01:13 PM
Pelikano Pelikano is offline
Registered User
Pelikano's Avatar
Join Date: Oct 2008
Posts: 1,133
Pelikano has a little shameless behaviour in the past
Quote:
Originally Posted by Twinny View Post
I scroll up to the top by habit and that does involve checking the date
It was at the top already when Crow posted
Reply With Quote
  #20  
Old 08-03-2009, 01:33 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Pelikano View Post
It was at the top already when Crow posted
He's talking about the top of the thread I guess
Reply With Quote
  #21  
Old 08-03-2009, 01:35 PM
Pelikano Pelikano is offline
Registered User
Pelikano's Avatar
Join Date: Oct 2008
Posts: 1,133
Pelikano has a little shameless behaviour in the past
Oh I see
Reply With Quote
Reply


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 03:11 PM.


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