Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-05-2006, 03:04 AM
Coolkid77742 Coolkid77742 is offline
Registered User
Join Date: Aug 2005
Posts: 79
Coolkid77742 is an unknown quantity at this point
Unhappy I need help with adding a Mp Potion Script

Ok I need a Script kinda like a mp pot that adds mp... then destroys im trying
//#CLIENTSIDE
if (weaponfired) playermp += +60; destroy; .... but then the mp adds when its fired then it dissapears
__________________
]
Reply With Quote
  #2  
Old 02-05-2006, 03:13 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
You need to have playermp changed serverside.

Use triggeraction.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #3  
Old 02-05-2006, 03:13 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by Coolkid77742
Ok I need a Script kinda like a mp pot that adds mp... then destroys im trying
//#CLIENTSIDE
if (weaponfired) playermp += +60; destroy; .... but then the mp adds when its fired then it dissapears
First, you'll want it to be:

NPC Code:
playermp += 60;



and not += +60.

Second, if you want more than one line of code to be executed if that if statement evaluates as true, you're going to want to make use of braces, such as { and }.

Example:

NPC Code:
if (condition) {
var1 = "blue"; // Line 1
var2 = 3; // Line 2
}



Third (as Napo posted), you should probably be changing the playermp/player.mp variable serverside.

Please refer to KSI-GS in the main scripting forum's advice thread. Also, you probably posted this thread in the wrong forum. This forum is for GS2-specific questions, and not only is your code entirely GS1 but your question has nothing to do with the new scripting engine.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 02:24 PM.


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