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 11-11-2007, 12:32 AM
Knightmare1 Knightmare1 is offline
Billy Allan
Knightmare1's Avatar
Join Date: Apr 2007
Posts: 804
Knightmare1 can only hope to improve
kicking?

ive tried a bunch of times, and failed, but is there even a way to CLICK on a player to kick them? like if im saying, ":kick" and click?
__________________
I am the devil, I am here to do to devils work.
Reply With Quote
  #2  
Old 11-11-2007, 01:12 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Yes

PHP Code:
function onMouseDown(mode)
{
  if (
player.chat == ":kick")
  {
    if (
mode == "left")
    {
      for (
pl players)
      {
        if (
mousex in |pl.xpl.x+1.5|)
        {
          if (
mousey in |pl.ypl.y+2|)
          {
            
triggerserver("gui"this.name"kickthatfool"pl.account);
            break;
          }
        }
      }
    }
  }

Change the 1.5 and 2 to whatever range you want to have.
Reply With Quote
  #3  
Old 11-11-2007, 01:12 AM
Rapidwolve24 Rapidwolve24 is offline
North*
Join Date: Oct 2007
Location: Massachusetts
Posts: 178
Rapidwolve24 is on a distinguished road
Send a message via AIM to Rapidwolve24 Send a message via MSN to Rapidwolve24
It has to be scripted.

PHP Code:
function onPlayerChats()
{
  if (
player.chat.starts(":kick"))
  {
    
temp.kickplayer findPlayer(player.chat.substring(5).trim());
    
    if (
temp.kickplayer.level == player.level)
    {
      
temp.kickplayer.setlevel2(levelxy);
    }
  }

For ":kick account"

Last edited by Rapidwolve24; 11-11-2007 at 01:24 AM..
Reply With Quote
  #4  
Old 11-11-2007, 01:33 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Quote:
Originally Posted by Rapidwolve24 View Post

For ":kick account"
Quote:
Originally Posted by Knightmare1 View Post
even a way to CLICK on a player to kick them?
Reply With Quote
  #5  
Old 11-11-2007, 05:27 AM
Knightmare1 Knightmare1 is offline
Billy Allan
Knightmare1's Avatar
Join Date: Apr 2007
Posts: 804
Knightmare1 can only hope to improve
would this work?

PHP Code:
function onActionServerSide() {
  if (
params[0] == "StaffTag1") {
    
setLevel2("utopiaow_e4.nw"35.526);
}


//#CLIENTSIDE
function onMouseDown(mode)
{
  if (
player.chat == ":kick")
  {
    if (
mode == "left")
    {
      for (
pl players)
      {
        if (
mousex in |pl.xpl.x+1.5|)
        {
          if (
mousey in |pl.ypl.y+2|)
          {
            
triggerserver("gui"this.name"kicked"pl.account);
            break;
          }
        }
      }
    }
  }

__________________
I am the devil, I am here to do to devils work.
Reply With Quote
  #6  
Old 11-11-2007, 05:32 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
Quote:
Originally Posted by Knightmare1 View Post
would this work?
Close, just that you would need to change the actionserverside...
PHP Code:
function onActionServerSide() {
  if (
params[0] == "kicked") {
    
findplayer(params[1]).setlevel2("utopiaow_e4.nw"35.526);
  }

__________________
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
  #7  
Old 11-11-2007, 10:43 PM
Knightmare1 Knightmare1 is offline
Billy Allan
Knightmare1's Avatar
Join Date: Apr 2007
Posts: 804
Knightmare1 can only hope to improve
ty i used the params for my stafftag
__________________
I am the devil, I am here to do to devils work.
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 10:20 AM.


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