im copypaste your code))) but not... unload scripts.. skeleton walk and teleported))
Code: Select all
use os;
use uo;
include "include/client";
include "include/attributes";
program walk_on_moongate(mobile, gate)
if ( !CanTeleport(mobile))
return 0;
endif
var magery := CInt(GetObjProperty(gate,"magery"));
if((magery) && (mobile.acctname))
if(GetEffectiveSkill(mobile, SKILLID_MAGERY) < magery)
SendSysMessage(mobile,"your knowledge of the arcane arts is too low to traverse this gate.");
return;
endif
endif
set_critical(1);
if(GetObjProperty(mobile, "#justgated"))
return;
endif
var x, y, z;
x := GetObjProperty( gate, "DestX" );
y := GetObjProperty( gate, "DestY" );
z := GetObjProperty( gate, "DestZ" );
foreach critter in ListMobilesNearLocation( gate.x, gate.y, gate.z, 8);
if(((critter.script == "employed") && (CInt(GetObjProperty(critter, "master")) == mobile.serial)) || ((critter.script == "escortee") && (CInt(GetObjProperty(critter, "Escortee")) == mobile.serial)) || ((critter.script == "tamed") && (CInt(GetObjProperty(critter, "master")) == mobile.serial)))
SetObjProperty(critter, "Pause", 1);
MoveCharacterToLocation( critter, gate.x, gate.y, gate.z, MOVECHAR_FORCELOCATION);
EraseObjProperty(critter, "Pause");
endif
endforeach
SetObjProperty(mobile,"#justgated",1);
MoveCharacterToLocation(mobile, x, y, z );
sleep(1);
EraseObjProperty(mobile,"#justgated");
endprogram
function CanTeleport(mobile)
if ( mobile.acctname ) // player
return 1;
elseif ( mobile.npctemplate )
if ( mobile.script == "employed" )
return 1;
elseif ( mobile.script == "tamed" )
return 1;
elseif ( mobile.script == "escortee" )
return 1;
else
return 0;
endif
endif
endfunction