Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dofile("Forgee.lua")
- function equipShield()
- local SHIELDID = 3420 -- Shield ID (6390 = nightmare, 3420 = demon)
- local BACKUPWEPID = 7368 -- Backup weapon ID (sin stars = 7368)
- local TWOHANDERID = 8027 -- [x]bow id -- 8027 = hornbow
- local RADIUSTOCHECK = 1 -- directly next to you
- local CRITICALAMOUNT = 2 -- how many monsters should be within the radius above to make u switch
- local SAFEDISTANCE = 3 -- how many monsters should be farther than that to siwtch to bow back
- --local CRITICALHEALTH = 30 -- % of health to resort to shield-star combination (not implemented yet)
- local BACKPACKNAME = 'Orange Backpack' -- Backpack where backup stuff are in
- --!!!!!!!!!!!!!!!!!!!!!!!
- --!!!DO NOT EDIT BELOW!!!
- --!!!!!!!!!!!!!!!!!!!!!!!
- local Backpack = Container.GetByName(BACKPACKNAME)
- if (monstersAround(RADIUSTOCHECK) >= CRITICALAMOUNT) then
- for Spot = 0, Backpack:ItemCount() do
- local Shield = Backpack:GetItemData(Spot)
- if (Shield.id == SHIELDID) then
- Backpack:MoveItemToEquipment(Spot, "shield")
- break
- end
- end
- for Spot = 0, Backpack:ItemCount() do
- local Wep = Backpack:GetItemData(Spot)
- if (Wep.id == BACKUPWEPID) then
- Backpack:MoveItemToEquipment(Spot, "weapon")
- break
- end
- end
- elseif (monstersAround(SAFEDISTANCE) == 0 and (Self.Weapon().id ~= TWOHANDERID)) then
- for Spot = 0, Backpack:ItemCount() do
- local Twohander = Backpack:GetItemData(Spot)
- if (Twohander.id == TWOHANDERID) then
- Backpack:MoveItemToEquipment(Spot, "weapon")
- end
- end
- end
- end
- while (true) do
- equipShield()
- wait(1000,1500)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement