Page 1 of 1
NPC appearances
Posted: Sun Apr 06, 2008 4:18 pm
by chrrox
NPc's appear to have a slight problem they seem to think their armor is a weapon lol I got killed bye a shirt

.
Also it seems certain things like wings and hair don't show up on all the races like the fae.
1 last question where does the emulator look for power requirements i keep getting an error comparing power requirements to nill and it crashes the emulator. I managed to get 1 spell to cast but i can't figure out what i changed.
Posted: Sun Apr 06, 2008 5:32 pm
by LethalEncounter
Can you paste the exact error? If it says Nill, then that is a LUA error not an emu one.
Posted: Sun Apr 06, 2008 5:53 pm
by chrrox
Left Grid 4294967295 and Entered Grid 1689359714
0: F5 00 00 00 FF 13 02 00 - 00 00 01 FE 20 83 01 00 | ............ ...
16: 00 00 01 00 01 00 01 00 - 01 00 01 00 01 00 00 00 | ................
32: 00 00 00 00 00 05 03 00 - 00 00 00 00 00 00 00 01 | ................
48: 00 00 01 00 00 00 80 3F - 00 00 00 00 00 00 00 00 | .......?........
64: 01 01 01 00 31 64 01 00 - 00 00 00 00 00 00 00 05 | ....1d..........
80: 00 00 00 05 00 00 00 00 - 00 00 00 00 00 00 00 00 | ................
96: 00 00 00 00 00 00 00 00 - 00 00 00 00 06 53 70 72 | .............Spr
112: 69 6E 74 0C 00 62 6F 6F - 73 74 73 20 73 70 65 65 | int..boosts spee
128: 64 83 01 00 00 00 01 00 - 01 00 01 00 01 00 01 00 | d...............
144: 01 00 00 00 00 00 00 00 - 00 05 03 00 00 00 00 00 | ................
160: 00 00 00 01 00 00 01 00 - 00 00 80 3F 00 00 00 00 | ...........?....
176: 00 00 00 00 01 01 01 00 - 31 64 01 00 00 00 00 00 | ........1d......
192: 00 00 00 05 00 00 00 05 - 00 00 00 00 00 00 00 00 | ................
208: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 | ................
224: 06 53 70 72 69 6E 74 0C - 00 62 6F 6F 73 74 73 20 | .Sprint..boosts
240: 73 70 65 65 64 | speed
BLAH: 161
BLAH: 161
BLAH: 161
BLAH: 161
BLAH: 161
BLAH: 161
BLAH: 161
BLAH: 161
0: 08 00 18 00 00 00 1D 81 - 42 17 81 42 17 81 42 17 | ........B..B..B.
16: 81 42 17 81 42 17 81 42 - 17 81 42 17 81 42 | .B..B..B..B..B
0: 0F 00 00 00 FF 19 02 0A - D7 23 3C 06 00 53 70 72 | .........#<..Spr
16: 69 6E 74 | int
Error running Spells/Sprint.lua:13: attempt to compare number with nil
Posted: Sun Apr 06, 2008 7:23 pm
by LethalEncounter
What does your Sprint.lua file look like?
Posted: Mon Apr 07, 2008 8:34 am
by chrrox
--[[
This is the EQ2 Spell 'Sprint' written in LUA.
These functions are shared, so don't save any character data in them.
If you have any questions be sure to read the readme.txt file located in this directory
--]]
--main process function
function process(Caster, Target, PowerCost, SpeedValue)
power_left = GetPower(Caster)
total_power = GetMaxPower(Caster)
if (total_power * PowerCost) < power_left then
speed = GetSpeed(Caster)
if speed < SpeedValue then
SetSpeed(Caster, SpeedValue)
end
new_power = GetPower(Caster) - (total_power * PowerCost)
if new_power > 0 and HasMoved(Caster) == true then
SetPower(Caster, new_power)
elseif new_power <= 0 then
SetSpeed(Caster, 0)
end
else
SetSpeed(Caster, 0)
end
return
end
function remove(Caster, Target)
SetSpeed(Caster, 0)
end
Also there is a 50% chance the emulator crashes loading more than 50 spells at one time if it will load them it goese past 50 all the way to the end no problem but if it hangs around 50 it crashes the emu.
Posted: Mon Apr 07, 2008 8:39 am
by Arremis
Hehehe...+4 Chainmail of PC Slaying

Posted: Mon Apr 07, 2008 4:55 pm
by LethalEncounter
How bout your spells_data table for the Sprint spell?
Posted: Mon Apr 07, 2008 5:28 pm
by chrrox
for my spell data all values are 1
Posted: Mon Apr 07, 2008 7:59 pm
by LethalEncounter
For Sprint your table should look like:
id,spell_id,index_field,value_type,value,value2
1, 1, 0, FLOAT, .1, 0
2, 1, 1, FLOAT, 40, 0
Posted: Tue Apr 08, 2008 7:32 pm
by chrrox
Thanks LE worked like a charm
