Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   Personal Dragger (https://forums.graalonline.com/forums/showthread.php?t=76584)

Knightmare1 08-31-2007 08:15 AM

Personal Dragger
 
me and my friend fleshkiller want to make our Dragger script so that no one else steals it, and we need help

PHP Code:

//NPC Made By:Tabetha
function onActionserverside(command){
  switch(
command){
    case 
"drag":
      
findplayer(params[1]).setlevel2(params[2],params[3]%64,params[4]%64);

    break;
  }
}
//#CLIENTSIDE
function onMousedown(){
  
setTimer(.05);
}
function 
onTimeout(){
  if (
leftmousebutton(#a,knightmare1)||leftmousebutton(#a,fleshkiller)) {
    
for (this.i=0this.<= playerscountthis.i++) {
      if (
mousex in |players[this.i].x,players[this.i].2.5| && mousey in |players[this.i].y,players[this.i].3|) {
        if (
this.dragging NULLthis.dragging players[this.i].account;
      }
    }
    if (
this.dragging) {
      
player.chat "Dragging :" SPC this.dragging;
    }
      
setTimer(.05);
  }else {
  
triggeraction(0,0,"serverside",#N,"drag",this.dragging,player.level,mousex-1.5,mousey-1.5);
  
this.dragging NULL;
  
hideimgs(1,4);
  } 


Kyranki 08-31-2007 08:31 AM

What do you mean, 'so noone else steals it'? Noone with half a brain about scripting would steal that. O_O

contiga 08-31-2007 11:00 AM

if (leftmousebutton(#a,knightmare1)||leftmousebutton( #a,fleshkiller))

should be

if ( leftmousebutton && player.account in { "knightmare1", "fleshkiller"})

Twinny 08-31-2007 11:36 AM

Your use of setlevel2 is confusing since you could quite easily just change temp.pl.x and temp.pl.y

Knightmare1 08-31-2007 04:48 PM

oops

Chompy 08-31-2007 05:04 PM

Quote:

Originally Posted by Knightmare1 (Post 1344939)
i mean on my server, cuz me and my friend use it to pk

to pk? O.o

Like drag them on walls where you can slash them? sounds fun.. O_o

Switch 08-31-2007 06:02 PM

Abusers Haha Xd


All times are GMT +2. The time now is 06:09 AM.

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