function onStartup(self,msg) --print("script on X is working") end function onRebuildComplete(self,msg) --print(self:GetVar("flagNum")) --msg.userID:SetFlag{iFlagID = "6"..self:GetVar("flagNum"), bFlag = true} --script for pet dig to flag -- on hold for F&F --print("rebuild complete") --get the position and rotation of the X to spawn the pet treasure node in the same location. local oPos = { pos = {}, rot = {}} oPos.pos = self:GetPosition().pos local player = msg.userID:GetID() --load the pet treasure node, passing the player the built the X as a varible and the config data of the collible flag number local config = { { "groupID" , "Flag"..self:GetVar("flagNum") },{ "builder" , '|'..player },{ "X" , '|' .. self:GetID() } } --X is to smash this quickbuild RESMGR:LoadObject { objectTemplate = 7410, x= oPos.pos.x, y= oPos.pos.y + .5 , z= oPos.pos.z, owner = self, configData = config} end