Jump to content
  • 0

Scripting Help (ItemCheck)


NexusXVI

Question


  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   6
  • Joined:  01/18/12
  • Last Seen:  

This was I think, Emistry Script : Limited Item

I've been tweaking it a bit, but in pure sense I can't do what I want to do.. of-course.

The catch is this scripts check it if an item is exceeding it's value on a certain map +1, If there was actually a way to reverse it and check if an item is gone, like rental items when it disappears it will warp you out of the map.

 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1678
  • Reputation:   703
  • Joined:  12/21/14
  • Last Seen:  

15 minutes ago, NexusXVI said:

If there was actually a way to reverse it and check if an item is gone, like rental items when it disappears it will warp you out of the map.

i don't know if it would work that way but you can try to make script OnTimer1000: //1000 = 1sec so it will check every 1 sec if i am not wrong

like this

-	script	checker	-1,{
OnTimer1000:
	getmapxy .@ma$,.@ax,.@ay,0;
		if(.@ma$ == "your_map_name")
		{
			//your script
		}
}

but as i said i don't know if it will work

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   6
  • Joined:  01/18/12
  • Last Seen:  

On the script , It actually check on the item every 5 seconds

// Check Every X Seconds
set .Seconds,5;

The way that I don't understand is to reverse the process, instead of the script checking if the player has reached the limit of an item which is by addition, to go around to check if the item is subtracting.. 

In the script it will knock you out of the map if u have ex. 101 apples, if the limit is on 100.

Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1678
  • Reputation:   703
  • Joined:  12/21/14
  • Last Seen:  

so you want to sheck if the player don't have the item ?

there is way for that but simple also you can use the if

if the player have the item 

       do nothing

else

       kick from the map

that would work with the script you have

also

if (countitem (item_id) == 0)

Edited by sader1992
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   6
  • Joined:  01/18/12
  • Last Seen:  

This is fixed now :D, thanks @Emistry for that script.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...