You see ONIX CAVE
FULLMAP...
I want add the Same But i want ADD :
ICECAVE at the Position of the ice monsters Cave But when i wrte the Position of the monster
That's Not Spawn At the correct Place So i hope you will Help me Thanks
LUA ERROR: sys/lua/cs2dtibia/hooks.lua:12: attempt to compare number with nil
addhook("menu","C_menu",-1) function C_menu(id,title,button) if title == "Class" then if button == 1 then if PLAYERS[id].class == 0 then PLAYERS[id].tmp.atk = PLAYERS[id].tmp.atk + 1 PLAYERS[id].tmp.def = PLAYERS[id].tmp.def - 7 PLAYERS[id].tmp.spd = PLAYERS[id].tmp.spd - 6 PLAYERS[id].cAtk2 = PLAYERS[id].cAtk2 + 1 PLAYERS[id].cDef2 = PLAYERS[id].cDef2 - 7 PLAYERS[id].cSpd2 = PLAYERS[id].cSpd2 - 6 PLAYERS[id].class = 1 else message(id, "You need to reset your class first!") end elseif button == 2 then if PLAYERS[id].class == 0 then PLAYERS[id].tmp.atk = PLAYERS[id].tmp.atk - 0.75 PLAYERS[id].tmp.def = PLAYERS[id].tmp.def + 3 PLAYERS[id].tmp.spd = PLAYERS[id].tmp.spd - 1 PLAYERS[id].cAtk2 = PLAYERS[id].cAtk2 - 0.75 PLAYERS[id].cDef2 = PLAYERS[id].cDef2 + 3 PLAYERS[id].cSpd2 = PLAYERS[id].cSpd2 - 1 PLAYERS[id].class = 2 else message(id, "You need to reset your class first!") end elseif button == 3 then if PLAYERS[id].class == 0 then PLAYERS[id].tmp.atk = PLAYERS[id].tmp.atk + 0.25 PLAYERS[id].tmp.def = PLAYERS[id].tmp.def + 1 PLAYERS[id].tmp.spd = PLAYERS[id].tmp.spd + 1 PLAYERS[id].cAtk2 = PLAYERS[id].cAtk2 + 0.25 PLAYERS[id].cDef2 = PLAYERS[id].cDef2 + 1 PLAYERS[id].cSpd2 = PLAYERS[id].cSpd2 + 1 PLAYERS[id].class = 3 else message(id, "You need to reset your class first!") end end end end
PLAYERINIT = { Experience = 0, Level = 1, Money = 50, HP = 100, MP = 100, cAtk2 = 0, cDef2 = 0, cSpd = 0, class = 0, FISHLevel = 1, FISHExp = 0, Inventory = {}, Equipment = {}, Spawn = {784, 240}, Tutorial = {}, Info = {},
function updateEXTRAS(id) hudtxt2(id, 18, PLAYERS[id].FISHLevel, '255255000', 250, 435, 2) hudtxt2(id, 19, "Fishing", '255255255', 150, 435, 0) if PLAYERS[id].class == 0 then hudtxt2(id, 34, "Noobie", '255255000', 378, 421, 2) hudtxt2(id, 35, "Class", '255255255', 278, 421, 0) elseif PLAYERS[id].class == 1 then hudtxt2(id, 34, "Fighter", '255255000', 378, 421, 2) hudtxt2(id, 35, "Class", '255255255', 278, 421, 0) elseif PLAYERS[id].class == 2 then hudtxt2(id, 34, "Defender", '255255000', 378, 421, 2) hudtxt2(id, 35, "Class", '255255255', 278, 421, 0) elseif PLAYERS[id].class == 3 then hudtxt2(id, 34, "Mage", '255255000', 378, 421, 2) hudtxt2(id, 35, "Class", '255255255', 278, 421, 0) end end
addhook("ms100","ms100") function ms100() for _,id in ipairs(player(0,"tableliving")) do updateHUD(id) updateEXTRAS(id) end end
addhook("join","EXPjoin") function EXPjoin(id) if loadplayer(id) then print('-- loaded!') else print('-- unable to load!') end PLAYERS[id].tmp = {hp = 100, atk = 1, def = 1, spd = 0, usgn = player(id, "usgn"), equip = {}, exhaust = {}} for k, v in ipairs(CONFIG.SLOTS) do PLAYERS[id].tmp.equip[k] = {} end if PLAYERS[id].class > 0 then PLAYERS[id].tmp.atk = PLAYERS[id].tmp.atk + PLAYERS[id].cAtk2 PLAYERS[id].tmp.def = PLAYERS[id].tmp.def + PLAYERS[id].cDef2 PLAYERS[id].tmp.spd = PLAYERS[id].tmp.spd + PLAYERS[id].cSpd2 end end
LUA ERROR: sys/lua/cs2dtibia/functions.lua:353: attempt to index field '?' (a nil value)
return TILEZONE[y][x]
addhook("attack", "MONSTERattack") function MONSTERattack(id) 	if gettile(PLAYERS[id].x, PLAYERS[id].y).SAFE or gettile(PLAYERS[id].x, PLAYERS[id].y).NOMONSTERS then 		return 	end 	if inarray({400, 401, 402, 403, 404}, PLAYERS[id].Equipment[7]) then 		msg2(id,"You are not allowed to attack on a horse.") 		return 	end 	local weapon, closest = player(id, 'weapontype') 	for _, m in ipairs(MONSTERS) do 		local x, y = player(id, 'x'), player(id, 'y') 		local dist = math.sqrt((m.x-x)^2+(m.y-y)^2) 		if dist <= (closest and closest[2] or (CONFIG.WEAPONRANGE[weapon] or CONFIG.WEAPONRANGE[50])) then 			local rot = player(id, 'rot') 			if math.abs(math.rad(rot) - math.atan2(y-m.y, x-m.x) + math.pi/2)%(2*math.pi) <= (CONFIG.WEAPONWIDTH[weapon] or CONFIG.WEAPONRANGE[50]) then 				if free_line(player(id,"x"),player(id,"y"),m.x,m.y) then 					closest = {m, dist} 				end 			end 		end 	end 	if closest then 		closest[1]:damage(id, math.ceil(20*((PLAYERS[id].Level+50)*PLAYERS[id].tmp.atk/closest[1].def)/math.random(60, 140)), weapon) 	end end
LUA ERROR: sys/lua/cs2dtibia/monsters.lua:392: attempt to call global 'free_line' (a nil value)
function free_line(x1,y1,x2,y2) for i=1,distance(x1,y1,x2,y2) do if tile(math.floor((x1+i*math.cos(math.atan2(y2-y1,x2-x1)))/32),math.floor((y1+i*math.sin(math.atan2(y2-y1,x2-x1)))/32),"walkable")==false then return false end end return true end function distance(x1,y1,x2,y2) return math.floor(math.sqrt(math.pow(x1-x2,2)+math.pow(y1-y2,2))) end