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 12-22-2004, 04:28 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
NPC warping

I am working on a new battle system for ELemental Kingdoms but I cannot find a way to warp npcs to a level, which is a huge part of it (I have tried a few other ways, to no avail). anyb suggestions (please dont say get a good NAT)?
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
Reply With Quote
  #2  
Old 12-22-2004, 04:41 AM
ZeroTrack ZeroTrack is offline
G2K1 Developer
ZeroTrack's Avatar
Join Date: Apr 2004
Location: LongIsland, NY
Posts: 402
ZeroTrack is on a distinguished road
Send a message via AIM to ZeroTrack
Quote:
Originally Posted by falco10291029
I am working on a new battle system for ELemental Kingdoms but I cannot find a way to warp npcs to a level, which is a huge part of it (I have tried a few other ways, to no avail). anyb suggestions (please dont say get a good NAT)?
to my knowledge there are a few ways to do it, canwarp and canwarp2 depending if the npcs are attached to you or are moving. and doing with(getnpc(npcname)) setlevel2 level,x,y; this only works with dbnpc's though
__________________

Reply With Quote
  #3  
Old 12-22-2004, 04:50 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
I am not using a db npc, its a class npc, that's what makes it hard
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
Reply With Quote
  #4  
Old 12-22-2004, 05:11 AM
Slash-P2P Slash-P2P is offline
Banned
Join Date: May 2004
Location: Burning Blade
Posts: 941
Slash-P2P is on a distinguished road
use canwarp/canwarp2 and warpto x,y,level;
Reply With Quote
  #5  
Old 12-22-2004, 05:39 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
warpto doesnt work except on database npcs :/
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
Reply With Quote
  #6  
Old 12-22-2004, 05:54 AM
ZeroTrack ZeroTrack is offline
G2K1 Developer
ZeroTrack's Avatar
Join Date: Apr 2004
Location: LongIsland, NY
Posts: 402
ZeroTrack is on a distinguished road
Send a message via AIM to ZeroTrack
Quote:
Originally Posted by falco10291029
warpto doesnt work except on database npcs :/
this is true , you cant warp local npc's if this is what your trying to do, you have to use canwarp/canwarp2 and either attach it to the player or use move
__________________

Reply With Quote
  #7  
Old 12-22-2004, 06:41 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
hmm i know the command to attatch to a player i just didnt think it warped with them plus I wqas told that it wasnt a good thing to do. I will try that soon and let you guys know.
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
Reply With Quote
  #8  
Old 12-22-2004, 06:55 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
NPCs that were layed with putnpc2 can warpto and stuff.
Reply With Quote
  #9  
Old 12-22-2004, 08:08 AM
ZeroTrack ZeroTrack is offline
G2K1 Developer
ZeroTrack's Avatar
Join Date: Apr 2004
Location: LongIsland, NY
Posts: 402
ZeroTrack is on a distinguished road
Send a message via AIM to ZeroTrack
Quote:
Originally Posted by Python523
NPCs that were layed with putnpc2 can warpto and stuff.
cause they are considered held on the server correct? not local npcs?
__________________

Reply With Quote
  #10  
Old 12-22-2004, 08:48 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally Posted by ZeroTrack
cause they are considered held on the server correct? not local npcs?
They are considered DB NPCs, so technically, yea.
Reply With Quote
  #11  
Old 12-22-2004, 09:30 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
well mine just join the class directly, so that wouldnt work, ill try the attatching. But i'll remeber that putnpc2 thing, maybe make a summoning spell
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
Reply With Quote
  #12  
Old 12-23-2004, 03:34 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
hmm, how do i find the npcs id that i want the player to be attached to? i tried a couple ways, like a for loop, but it didnt seem to work.
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
Reply With Quote
  #13  
Old 12-23-2004, 03:36 AM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
The current NPC's ID is stored, unsurprisingly, in the variable
NPC Code:
id

. By extension, you should be able to use
NPC Code:
players[index].id

.
Reply With Quote
  #14  
Old 12-23-2004, 04:34 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
ok, i wasnt sure if that worked, because it didnt seem to, i'l lretry it.
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
Reply With Quote
  #15  
Old 12-23-2004, 04:40 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
It attaches, but doesn't warp, here's the script, I can't see what's wrong:
PHP Code:
 else if (players[i].x in |x-3,x+3|&&players[i].y in |y-3,y+3|) {
this.w=int(random(0,1000));
copylevel neutral-battle.nw,neutral-battle#v(this.w).nw;
canwarp;
      
with(players[i]) {
attachplayertoobj 0,id;
setlevel2 neutral-battle#v(this.w).nw,30,20;
detatchplayer;
   }

timeout=1;


__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
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:48 PM.


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