• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Windows Issues with Ladders and even Newtype

Saints Anathema

Old School Doleran
Joined
Feb 24, 2009
Messages
653
Reaction score
8
Location
BC,Canada
Heres a issue ive come across that i havent been able to even learn more about on here.


my original script was

Code:
local upFloorIds = {1386, 3678, 5543}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if isInArray(upFloorIds, item.itemid) == TRUE then
		fromPosition.y = fromPosition.y + 1
		fromPosition.z = fromPosition.z - 1
	else
		fromPosition.z = fromPosition.z + 1
	end
	doTeleportThing(cid, fromPosition, FALSE)
	return TRUE
end

that was a working script for tfs 0.2.4

since i upgraded to tfs 0.4 REV 4389 all my ladders dont work ladder id (1386)

so my friend chan suggested using

Code:
local UP_FLOORS = {1386, 3678, 5543, 8599, 10035}
local FIELDS = {1497, 1499, 11095, 11096}
local DRAW_WELL = 1369

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(item.itemid == DRAW_WELL and item.actionid ~= 100) then
		return false
	end

	local check = false
	fromPosition.stackpos = STACKPOS_GROUND
	if(isInArray(UP_FLOORS, item.itemid)) then
		fromPosition.z = fromPosition.z - 1
		fromPosition.y = fromPosition.y + 1
		if(doTileQueryAdd(cid, fromPosition, 38, false) ~= RETURNVALUE_NOERROR) then
			local field = getTileItemByType(fromPosition, ITEM_TYPE_MAGICFIELD)
			if(field.uid == 0 or not isInArray(FIELDS, field.itemid)) then
				fromPosition.y = fromPosition.y - 2
			else
				check = true
			end
		end
	else
		fromPosition.z = fromPosition.z + 1
	end

	if(not check and doTileQueryAdd(cid, fromPosition, 38, false) ~= RETURNVALUE_NOERROR) then
		local field = getTileItemByType(fromPosition, ITEM_TYPE_MAGICFIELD)
		if(field.uid == 0 or not isInArray(FIELDS, field.itemid)) then
			return false
		end
	end

	local pos, dir = getCreaturePosition(cid), SOUTH
	if(pos.x < fromPosition.x) then
		dir = EAST
	elseif(pos.x == fromPosition.x) then
		if(pos.y == fromPosition.y) then
			dir = getCreatureLookDirection(cid)
		elseif(pos.y > fromPosition.y) then
			dir = NORTH
		end
	elseif(pos.x > fromPosition.x) then
		dir = WEST
	end

	doTeleportThing(cid, fromPosition, false)
	doCreatureSetLookDirection(cid, dir)
	return true
end

and putting

Code:
      <!-- Teleport (stairs, ladders) -->
	<action itemid="430" event="script" value="other/teleport.lua"/>
	<action itemid="1369" event="script" value="other/teleport.lua"/>
	<action itemid="1386" event="script" value="other/teleport.lua"/>
	<action itemid="3678" event="script" value="other/teleport.lua"/>
	<action itemid="5543" event="script" value="other/teleport.lua"/>
	<action itemid="8580" event="script" value="other/teleport.lua"/>
	<action itemid="8599" event="script" value="other/teleport.lua"/>
	<action itemid="10035" event="script" value="other/teleport.lua"/>

After i tried that,

Ladders say Cannot use this item, and shows no errors in console

dont know if this has anything to do with it, but i replaced the items.otb to the newest version from my REV, and for whatever reason dont konw if this has anything to do with it, but my /newtype command only shows me monsters up to 352-370? the rest are ground tiles, but then my mounted monsters show up after the ground tiles.


Any suggestions?

REP+ to all positive posts.
 
ladders0002.jpg


This ladder in a house, works completely fine, i mean like i can deal with having them slide down one on a wall like that.

ladders0003.jpg


working ladder in a house,

ladders0006.jpg


Same ladder on a boat and for some reason says Cannot used item....

ladders0007.jpg


the ladder DIRECTLY!! outside the boat, works same as the one in the house but north a square

ladders0009.jpg


Sewers arent working but theyre both in actions.xml and in script

ladders0010.jpg


Newtype 352 XD

ladders0012.jpg


yet the 2 warrior outfits work, but strangely now the mount monsters dont show up, yet the monsters outfit, i guess like in a monsterfile, the sprite still shows up for them

ladders0007.jpg


makes it go up on some invisble floor +1 of ground level
 
Last edited:
cant think of anything, but what is RETURNVALUE_NOERROR set to in 000-constant.lua? 0 or 1?

regarding /newtype, it now uses monster names. if you type a number it'll lookup for an item with that id i think
 
cant think of anything, but what is RETURNVALUE_NOERROR set to in 000-constant.lua? 0 or 1?

it is currently 1

egarding /newtype, it now uses monster names.

i was going to say, well what if they havent been made a monster yet, the reason why i wanted to /newtype the # was to make new monsters and get ideas for them, i just tried /newtype lizard chosen and it showed up because i dl'd some of those files and put them in

I greatly appreciate your help, bud thanks again i sure i cant even rep+ you though not lik you need it XD
 
@up I agree totaly with cyko cuz he is the master lol but besides that i cannot be any help =(
Code:
--teleport holes--
 
 
   function onUse(cid, item, frompos, item2, topos)
   	npos = {x=frompos.x, y=frompos.y, z=frompos.z}
   	if item.itemid == 1386 or item.itemid == 3678 then
   		npos.y = npos.y + 1
   		npos.z = npos.z - 1
   		doTeleportThing(cid,npos)
   	else
   		npos.z = npos.z + 1
   		doTeleportThing(cid,npos)
   	end
 
   	return 1
   end
thats my teleport.lua anyway if it helps any lol
 
appreciate the help there daniel, which rev or tfs version are you using?

im going to test it, but if this doesnt not work i think im going to go into remeres and change out ever 1386 on my server to like rope holes or something. I already thought of this earlier but i didnt think this was that crazy of a problem XD

rep+ thanks for helping
 
it is currently 1
now it gets complicated. its supposed to be 0 and now you're supposed to download the latest 000-constant.lua and the rest of the libs cause they seem to be outdated (of an earlier revision), but you can't since you're not a premium user
i was going to say, well what if they havent been made a monster yet, the reason why i wanted to /newtype the # was to make new monsters and get ideas for them, i just tried /newtype lizard chosen and it showed up because i dl'd some of those files and put them in
maybe use an older /newtype then.

loljk
Code:
RETURNVALUE_NOERROR = 0
RETURNVALUE_NOTPOSSIBLE = 1
RETURNVALUE_NOTENOUGHROOM = 2
RETURNVALUE_PLAYERISPZLOCKED = 3
RETURNVALUE_PLAYERISNOTINVITED = 4
RETURNVALUE_CANNOTTHROW = 5
RETURNVALUE_THEREISNOWAY = 6
RETURNVALUE_DESTINATIONOUTOFREACH = 7
RETURNVALUE_CREATUREBLOCK = 8
RETURNVALUE_NOTMOVABLE = 9
RETURNVALUE_DROPTWOHANDEDITEM = 10
RETURNVALUE_BOTHHANDSNEEDTOBEFREE = 11
RETURNVALUE_CANONLYUSEONEWEAPON = 12
RETURNVALUE_NEEDEXCHANGE = 13
RETURNVALUE_CANNOTBEDRESSED = 14
RETURNVALUE_PUTTHISOBJECTINYOURHAND = 15
RETURNVALUE_PUTTHISOBJECTINBOTHHANDS = 16
RETURNVALUE_TOOFARAWAY = 17
RETURNVALUE_FIRSTGODOWNSTAIRS = 18
RETURNVALUE_FIRSTGOUPSTAIRS = 19
RETURNVALUE_CONTAINERNOTENOUGHROOM = 20
RETURNVALUE_NOTENOUGHCAPACITY = 21
RETURNVALUE_CANNOTPICKUP = 22
RETURNVALUE_THISISIMPOSSIBLE = 23
RETURNVALUE_DEPOTISFULL = 24
RETURNVALUE_CREATUREDOESNOTEXIST = 25
RETURNVALUE_CANNOTUSETHISOBJECT = 26
RETURNVALUE_PLAYERWITHTHISNAMEISNOTONLINE = 27
RETURNVALUE_NOTREQUIREDLEVELTOUSERUNE = 28
RETURNVALUE_YOUAREALREADYTRADING = 29
RETURNVALUE_THISPLAYERISALREADYTRADING = 30
RETURNVALUE_YOUMAYNOTLOGOUTDURINGAFIGHT = 31
RETURNVALUE_DIRECTPLAYERSHOOT = 32
RETURNVALUE_NOTENOUGHLEVEL = 33
RETURNVALUE_NOTENOUGHMAGICLEVEL = 34
RETURNVALUE_NOTENOUGHMANA = 35
RETURNVALUE_NOTENOUGHSOUL = 36
RETURNVALUE_YOUAREEXHAUSTED = 37
RETURNVALUE_PLAYERISNOTREACHABLE = 38
RETURNVALUE_CANONLYUSETHISRUNEONCREATURES = 39
RETURNVALUE_ACTIONNOTPERMITTEDINPROTECTIONZONE = 40
RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER = 41
RETURNVALUE_YOUMAYNOTATTACKAPERSONINPROTECTIONZONE = 42
RETURNVALUE_YOUMAYNOTATTACKAPERSONWHILEINPROTECTIONZONE = 43
RETURNVALUE_YOUMAYNOTATTACKTHISCREATURE = 44
RETURNVALUE_YOUCANONLYUSEITONCREATURES = 45
RETURNVALUE_CREATUREISNOTREACHABLE = 46
RETURNVALUE_TURNSECUREMODETOATTACKUNMARKEDPLAYERS = 47
RETURNVALUE_YOUNEEDPREMIUMACCOUNT = 48
RETURNVALUE_YOUNEEDTOLEARNTHISSPELL = 49
RETURNVALUE_YOURVOCATIONCANNOTUSETHISSPELL = 50
RETURNVALUE_YOUNEEDAWEAPONTOUSETHISSPELL = 51
RETURNVALUE_PLAYERISPZLOCKEDLEAVEPVPZONE = 52
RETURNVALUE_PLAYERISPZLOCKEDENTERPVPZONE = 53
RETURNVALUE_ACTIONNOTPERMITTEDINANOPVPZONE = 54
RETURNVALUE_YOUCANNOTLOGOUTHERE = 55
RETURNVALUE_YOUNEEDAMAGICITEMTOCASTSPELL = 56
RETURNVALUE_CANNOTCONJUREITEMHERE = 57
RETURNVALUE_TILEISFULL = 58
RETURNVALUE_NAMEISTOOAMBIGUOUS = 59
RETURNVALUE_CANONLYUSEONESHIELD = 60
RETURNVALUE_YOUARENOTTHEOWNER = 61
RETURNVALUE_YOUMAYNOTCASTAREAONBLACKSKULL = 62
 
download the latest 000-constant.lua and the rest of the libs cause they seem to be outdated (of an earlier revision), but you can't since you're not a premium user

funny story about that, i dl'd the revision i use, hosted it to my dedi with speedy share, looked back about a week later and was banned on otland.net because i didn't use the kill link EVEN though it had only been downloaded like once! lol, and i literally re-newed my premium right before this so since then, i cant be arsed to re-new it again... Ive showed my support on here a few times.. i definitely wasn't distribution that stuff.

maybe use an older /newtype then.

im my mind the monster looktype issue is fine now, i can easily use the looktype thread on here to get all the monster looktype numbers and jsut add them in, appreciate the help in the right direction on this

RETURNVALUE_NOERROR = 0
RETURNVALUE_NOTPOSSIBLE = 1
RETURNVALUE_NOTENOUGHROOM = 2
RETURNVALUE_PLAYERISPZLOCKED = 3
RETURNVALUE_PLAYERISNOTINVITED = 4
RETURNVALUE_CANNOTTHROW = 5
RETURNVALUE_THEREISNOWAY = 6
RETURNVALUE_DESTINATIONOUTOFREACH = 7
RETURNVALUE_CREATUREBLOCK = 8
RETURNVALUE_NOTMOVABLE = 9
RETURNVALUE_DROPTWOHANDEDITEM = 10
RETURNVALUE_BOTHHANDSNEEDTOBEFREE = 11
RETURNVALUE_CANONLYUSEONEWEAPON = 12
RETURNVALUE_NEEDEXCHANGE = 13
RETURNVALUE_CANNOTBEDRESSED = 14
RETURNVALUE_PUTTHISOBJECTINYOURHAND = 15
RETURNVALUE_PUTTHISOBJECTINBOTHHANDS = 16
RETURNVALUE_TOOFARAWAY = 17
RETURNVALUE_FIRSTGODOWNSTAIRS = 18
RETURNVALUE_FIRSTGOUPSTAIRS = 19
RETURNVALUE_CONTAINERNOTENOUGHROOM = 20
RETURNVALUE_NOTENOUGHCAPACITY = 21
RETURNVALUE_CANNOTPICKUP = 22
RETURNVALUE_THISISIMPOSSIBLE = 23
RETURNVALUE_DEPOTISFULL = 24
RETURNVALUE_CREATUREDOESNOTEXIST = 25
RETURNVALUE_CANNOTUSETHISOBJECT = 26
RETURNVALUE_PLAYERWITHTHISNAMEISNOTONLINE = 27
RETURNVALUE_NOTREQUIREDLEVELTOUSERUNE = 28
RETURNVALUE_YOUAREALREADYTRADING = 29
RETURNVALUE_THISPLAYERISALREADYTRADING = 30
RETURNVALUE_YOUMAYNOTLOGOUTDURINGAFIGHT = 31
RETURNVALUE_DIRECTPLAYERSHOOT = 32
RETURNVALUE_NOTENOUGHLEVEL = 33
RETURNVALUE_NOTENOUGHMAGICLEVEL = 34
RETURNVALUE_NOTENOUGHMANA = 35
RETURNVALUE_NOTENOUGHSOUL = 36
RETURNVALUE_YOUAREEXHAUSTED = 37
RETURNVALUE_PLAYERISNOTREACHABLE = 38
RETURNVALUE_CANONLYUSETHISRUNEONCREATURES = 39
RETURNVALUE_ACTIONNOTPERMITTEDINPROTECTIONZONE = 40
RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER = 41
RETURNVALUE_YOUMAYNOTATTACKAPERSONINPROTECTIONZONE = 42
RETURNVALUE_YOUMAYNOTATTACKAPERSONWHILEINPROTECTIONZONE = 43
RETURNVALUE_YOUMAYNOTATTACKTHISCREATURE = 44
RETURNVALUE_YOUCANONLYUSEITONCREATURES = 45
RETURNVALUE_CREATUREISNOTREACHABLE = 46
RETURNVALUE_TURNSECUREMODETOATTACKUNMARKEDPLAYERS = 47
RETURNVALUE_YOUNEEDPREMIUMACCOUNT = 48
RETURNVALUE_YOUNEEDTOLEARNTHISSPELL = 49
RETURNVALUE_YOURVOCATIONCANNOTUSETHISSPELL = 50
RETURNVALUE_YOUNEEDAWEAPONTOUSETHISSPELL = 51
RETURNVALUE_PLAYERISPZLOCKEDLEAVEPVPZONE = 52
RETURNVALUE_PLAYERISPZLOCKEDENTERPVPZONE = 53
RETURNVALUE_ACTIONNOTPERMITTEDINANOPVPZONE = 54
RETURNVALUE_YOUCANNOTLOGOUTHERE = 55
RETURNVALUE_YOUNEEDAMAGICITEMTOCASTSPELL = 56
RETURNVALUE_CANNOTCONJUREITEMHERE = 57
RETURNVALUE_TILEISFULL = 58
RETURNVALUE_NAMEISTOOAMBIGUOUS = 59
RETURNVALUE_CANONLYUSEONESHIELD = 60
RETURNVALUE_YOUARENOTTHEOWNER = 61
RETURNVALUE_YOUMAYNOTCASTAREAONBLACKSKULL = 62

at the risk of sounding stupid i just copy this all under

RETURNVALUE_NOERROR?
 
Code:
RETURNVALUE_DONTSHOWMESSAGE = 0
RETURNVALUE_NOERROR = 1
RETURNVALUE_NOTPOSSIBLE = 2
RETURNVALUE_NOTENOUGHROOM = 3
RETURNVALUE_PLAYERISPZLOCKED = 4

how my old one looked

Code:
RETURNVALUE_DONTSHOWMESSAGE = 0
RETURNVALUE_NOERROR = 0
RETURNVALUE_NOTPOSSIBLE = 1
RETURNVALUE_NOTENOUGHROOM = 2
RETURNVALUE_PLAYERISPZLOCKED = 3
RETURNVALUE_PLAYERISNOTINVITED = 4




im going to remove the value, then im going to try it with two 0's and see what ends up happening
 
Back
Top