View Full Version : PKED - Energy ring and SSA
Jassy Rock
02-05-2016, 10:17 AM
Does anyone has a script that equips you with energy ring and SSA if you got pked?!
Kind Regards;
Weslley Castro
kaspertje100
02-05-2016, 10:47 AM
I guess it will be pretty easy to make. You just want to equip e-ring and SSA instantly when you get attacked by a player?
You can use theselua functions:
Self.Equip(item, slot, amount) for equipping the ssa and ring.
if ((Self.ItemCount(3051) > 1) and ((Self.ItemCount(3081) >1) ) then
if (!Item.GetRingActiveID(3051)) and (!self.amulet.id(3081) then
// equip ring:
Self.Equip(3051, slot, 1)
// equip ssa:
Self.Equip(3081, slot, 1)
wait (200)
Okay so ofcourse this code snippets ain't finished yet. I just posted it to push you in the right direction. Haven't made xeno scripts lately so really have to read the documentation to refresh my memory with all the lua functions.
edit:
So I was looking in the docs for you but I couldn't find any functions that let you check if you are getting attacked by a player. What you could do is:
Iterate through the battelist to get all players from it:
for i = CREATURES_LOW, CREATURES_HIGH do
local cid = Creature.GetFromIndex(i)
check if creature is a player.
Check if you are in battle. --> Self.isInFight()
Check if there is a player with SKULL on your screen. Creature:Skull()
note: you will have to scan for creatures on your screen/battelist. And create a new creatureObject like this: Creature.New(Creature.GetFromIndex(i))
If both are true you might just want to put e-ring and ssa on or maybe you would like to add that you only wear them when your HP goes below a certian point.
List of all the lua functions:
http://xenobot.wikia.com/wiki/Documentation
Oscagi
02-05-2016, 12:44 PM
its not worth bcs u will waste alot of SSA and the PKER just can stay attacking you with wand or melee hits
Jontor
02-05-2016, 02:43 PM
Change a bit in this (http://forums.xenobot.net/showthread.php?40972-Equip-energy-ring-if-health-is-below-X) one
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.