Neylo on 10/6/2002 at 12:39
Hi,
I'm looking for a fonction that can return the cellid(the name) of the room the character is currently in. I fact i want to make a script that can teleport me home and then teleport me back where i was (i don't want to use mark and recall spells).
here is the script:
Begin warp_home
short OnPCEquip
if ( OnPCEquip == 1)
if ( Teleport_used == 0)
MessageBox " On rentre a la maison "
set Teleport_x to getpos x
set Teleport_y to getpos y
set Teleport_z to getpos z
player->PositionCell 1034.11, 771.27, 135, 0, "Balmora, My House"
set Teleport_used to 1
else
MessageBox " Retour au point de départ "
set Teleport_used to 0
endif
set OnPCEquip to 0
endif
end
Neylo on 10/6/2002 at 12:47
Begin warp_home
short OnPCEquip
if ( OnPCEquip == 1)
if ( Teleport_used == 0)
MessageBox " On rentre a la maison "
set Teleport_x to player->getpos x
set Teleport_y to player->getpos y
set Teleport_z to player->getpos z
;here i need a function like getcurrentcellid
;then i'll have set Teleport_CellID to player->getcurrentid
;but i don't know such function :confused:
;and getPCCell don't return the current location
; so is there a global variable or an hidden function that return the cellid the PC is currently in
player->PositionCell 1034.11, 771.27, 135, 0, "Balmora, My House"
set Teleport_used to 1
else
MessageBox " Retour au point de départ "
;if (Teleport_CellID==0)
;player->Position Teleport_x , Teleport_y , Teleport_z, 0
;else
;player->PositionCell Teleport_x , Teleport_y , Teleport_z, 0, Teleport_CellID
;endif
set Teleport_used to 0
endif
set OnPCEquip to 0
endif
end
BattleMage on 10/6/2002 at 16:32
That's unfortunately impossible simply because the cell ID is a string and there are no variables of the string type. :(
It's a popular complaint on the official forums. :)