Forum

> > CS2D > Scripts > tibia doesnt work normally
Forums overviewCS2D overview Scripts overviewLog in to reply

English tibia doesnt work normally

2 replies
To the start Previous 1 Next To the start

old tibia doesnt work normally

DimAn01s
User Off Offline

Quote
With new version (0.1.2.7) rpg tibia doesn't work normally.
Player can't spawn in spawnplace, but can spawn in that place where he was killed. Also it increases characteristics.
LUA Error: sys/lua/cs2dtibia/hooks.lua:402 attempt to index field '?' (a nil value)
->sys/lua/cs2dtibia/hooks:402 in function (sys/lua/cs2dtibia/hooks.lua:401)
-> [C]: in function 'parse'
-> sys/lua/cs2dtibia/hooks.lua:380: in function 'EXPhit'
-> sys/lua/cs2dtibia/monsters.lua:490: in function 'hit'
-> sys/lua/cs2dtibia/monsters.lua:389: in function (sys/lua/cs2dtibia/monsters.lua:347)
-> in lua hook 'die', params: 0, 1, 250, 2678, 2400
Hooks:
Spoiler >

Sorry for my bad english.
Please help!

old Re: tibia doesnt work normally

VADemon
User Off Offline

Quote
For every die-hook you are using, you must apply the following change:
Add the code below right after the line with "function NAME(victim, killer, ...etc)"
1
2
3
4
if game("version")=="b 0.1.2.7" then
victim, killer = killer, victim -- make sure that the names are the same as the first two arguments from the line with function die(firstArg, secondArg)
-- where first arg should be "victim" and the second one is "killer"
end

Background: the die-hook function arguments are wrong for version 0.1.2.7. The code above takes care of checking the bugged version and applies the patch only when needed. It just swaps the argument values, nothing complicated.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview