Hi, i'm new in scripting and i need action to get royals from depot, how to do it?
Nextly what action to open door?
Hi, i'm new in scripting and i need action to get royals from depot, how to do it?
Nextly what action to open door?
First request:
Depends on how you'll setup it, On this case you'll have one backpack inside your depot chest with a lot of spears.
init start
local bpDepotAmmo = "green backpack"
local ammoName = "royal spear"
local ammoToMove = 40
local whereToMove = "backpack of holding" -- you can set your rhand, if you want.
init end
opendepot() wait(1500, 2500)
openitem(bpDepotAmmo ) waitcontainer(bpDepotAmmo)
moveitemsupto(ammoName, ammoToMove, whereToMove, bpDepotAmmo)
if itemcount(bpDepotAmmo, bpDepotAmmo) > 0 and itemcount(ammoName, bpDepotAmmo) == 0 then
openitem(bpDepotAmmo, bpDepotAmmo) waitping()
end
Second request:
init start
local DoorID = 8120 -- Closed door ID.
local pos = {$wptx, $wpty, $wptz} -- Coordinates from door, you can just create an action on sqm on door and it'll be fine.
init end
if topitem(unpack(pos)).id == DoorID then
useitem(DoorID, ground(unpack(pos))) waitping()
end
These are just simple examples, they'll work but keep in mind that it's a simple code.
Last edited by Donatello; 01-22-2014 at 08:03 PM.
both don't working for me, but thanks
Spear:
error in Action script TakeSpears:
["while itemcount(itemname, to) < amou..."]:LucasTerra.lua:1795 attempt to compare number with nil
stack traceback:
[" moveitemsupto(ammoName, ammoTomove, whereToMove, bpDepot..."]:id:7:10 in user script
Door Opener do nothing, no console error etc
E: Door opener problem solved, usegrounditem(id_door)
Still need working script for royal spears from dp
Last edited by kolouiy; 01-22-2014 at 05:50 PM.
Fixed, you just need to change ammoTomove for ammoToMove