me?Ballerlocke wrote:can you make a file with a complete script for download
nope, I don't have the time for it.
That function is pretty much just the missing piece of the puzzle, someone else should be able to make up a WP without to much hassle that will do the entire event.
Just look at the minigame WP's like AT or survival as an example, you could even just use the WP posted by someone earlier and get it to call the function after it wakes up instead of the code it currently does.
So many ways to do it, have fun.
--=== Added ===--
A little extra info for anyone looking at coding this event.
You get buffs for the extra skills.
I also suspect that the pawnAttackable_offset is where you will find a bit value for if it has already been hit by the skill.
using this will get printouts of that 4byte in memory.
Code: Select all
function tort()
local proc = getProc()
local function bitvalues()
filename = getExecutionPath() .. "/logs/tortlog.txt";
file, err = io.open(filename, "a+");
if( not file ) then
error(err, 0);
end
local objectList = CObjectList();
objectList:update();
local objSize = objectList:size()
for i = 0,objSize do
obj = objectList:getObject(i)
if obj.Id == 106881 then
local flags = memoryReadRepeat("int", proc, obj.Address + 0x388) or 0;
local bitnum=0x80000000
local bitstring=""
if bitAnd(flags,0x80000000) then
file:write("Bits,1,")
else
file:write("Bits,0,")
end
repeat
bitnum = bitnum / 2
if bitAnd(flags,bitnum) then
bitstring = bitstring .. "1,"
else
bitstring = bitstring .. "0,"
end
until bitnum == 1
file:write(bitstring.."\n")
end
end
file:close()
end
local function one(ID)
if ID == 106881 then bitvalues() end
local objectList = CObjectList();
objectList:update();
local objSize = objectList:size()
for i = 0,objSize do
obj = objectList:getObject(i)
if obj.Id == ID or ID == 106885 then
print(obj.Name)
player:target(obj)
RoMScript("UseExtraAction(1)")
yrest(10)
player:target(obj)
RoMScript("UseExtraAction(1)")
if ID == 106883 then
yrest(10)
player:target(obj)
RoMScript("UseExtraAction(1)")
end
yrest(20)
end
end
end
one(106882)
one(106882)
one(106881)
one(106883)
one(106884)
end