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 03-07-2004, 11:16 AM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
Summon - Gmap Problems

Hi,

I've made a summon script. It works but not on the Gmap.
So i tried to make it work like

NPC Code:

this.x=onmapx(#L)*64+playerx;
this.y=onmapy(#L)*64+playery;
triggeraction 0,0,serverside,-System,warp,#a,#L,#v(this.x),#v(this.y);


but that dont work
The Player who i summon will be warped on gmap but he will not warped to me.

plz Help
Reply With Quote
  #2  
Old 03-07-2004, 11:48 AM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
Re: Summon - Gmap Problems

Quote:
Originally posted by projectigi
Hi,

I've made a summon script. It works but not on the Gmap.
So i tried to make it work like

NPC Code:

this.x=onmapx(#L)*64+playerx;
this.y=onmapy(#L)*64+playery;
triggeraction 0,0,serverside,-System,warp,#a,#L,#v(this.x),#v(this.y);


but that dont work
The Player who i summon will be warped on gmap but he will not warped to me.

plz Help
Ugh, just check for the player's x and y serverside before doing getplayer.
Reply With Quote
  #3  
Old 03-07-2004, 12:12 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
you mean?
NPC Code:

if(actionserverside){
with(getplayer(#p(0))){
this.x=playerx;
this.y=playery;
setstring this.lvl,#L;
}
with(getplayer(#p(1))){
setlevel2 #s(this.lvl),#v(this.x),#v(this.y);
}
}
//#CLIENTSIDE
if(playerchats&&startswith(/summon,#c)){
tokenize #c;
triggeraction 0,0,serverside,-Summon,#a,#t(1);
}


?
Reply With Quote
  #4  
Old 03-07-2004, 12:22 PM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
The getplayer(#p(0)) part is uneeded as it is the local player anyway.
Reply With Quote
  #5  
Old 03-26-2004, 06:16 AM
Gman4pwnu Gman4pwnu is offline
Banned
Join Date: Jan 2004
Posts: 434
Gman4pwnu is on a distinguished road
Send a message via AIM to Gman4pwnu
What I did for this was I checked if the player was on a gmap level as all gmap levels on our server start with at_city-a-j1-11.nw.
so i checked for strcontains #L at_city- and if it was it summoned to the gmap level or else it summoned to the regular level. You may need to add more checks if you have more than 1 gmap.
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 08:41 AM.


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