Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-24-2009, 03:24 AM
Jiroxys7 Jiroxys7 is offline
Hazard to Graal
Jiroxys7's Avatar
Join Date: Apr 2009
Posts: 343
Jiroxys7 will become famous soon enough
2 questions (server warp & putnpc2)

Okay. Firstly, I've made an NPC that when the player says /serverlist, a GUI window pops up. with a long list of servers. The player can select one, click connect, and will warp to that server.

Everything works just fine. Except for the fact that i don't know how to make serverwarp read a var.
Currently it's: serverwarp this.selectedserverconnect;
though i've tried serverwarp @ this.selectedserverconnect; and a few more.
I just need the format.


Also, in regards to putnpc2. This has drivin me crazy.
Offline, I used putnpc to place a custom NPC (like, lets say it puts a bomb script that lays a bomb, that puts a few randomly sized explosions, in random areas within a certain area. I would put something like:
PHP Code:
if(weaponfired&&playerbombs>0){
if(
playerdir=0){
play put.wav;putnpc custombombimg.png,custombomb.txt,playerx+0.5,playery-1;
playerbombs-=1;
}
if(
playerdir=1){
play put.wav;putnpc custombombimg.png,custombomb.txt,playerx-1.5,playery+1;
playerbombs-=1;
}
if(
playerdir=2){
play put.wav;putnpc custombombimg.png,custombomb.txt,playerx+0.5,playery+2.5;
playerbombs-=1;
}
if(
playerdir=3){
play put.wav;putnpc custombombimg.png,custombomb.txt,playerx+2.5,playery+1;
playerbombs-=1;

Or whatever. The problem is, I've had -no- luck translating this to use putnpc2


I started with rescripting it online in GS2. Though as I kept searching every available resource I could find for what I was doing wrong, and as my frustration grew, I eventually started rescripting it in GS1 (So I can get what I got in GS1, then once I have everything else set up, I could try attempting to convert it back to GS2.) Still had no luck of course.

So could anyone please explain to me the correct format of putnpc2?
(I.e. the format for putnpc (in GS1) is: putnpc image.png, script.txt, x, y; )
__________________
MY POSTS ARE PRONE TO EDITS!
Reply With Quote
 


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:12 PM.


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