• 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!

TalkAction [Fun Script] Dance!!!

[18/06/2009 19:32:29] Lua Script Error: [TalkAction Interface]
[18/06/2009 19:32:29] data/talkactions/scripts/dancing.lua:eek:nSay

[18/06/2009 19:32:30] data/talkactions/scripts/dancing.lua:43: attempt to get length of field '?' (a nil value)
[18/06/2009 19:32:30] stack traceback:
[18/06/2009 19:32:30] data/talkactions/scripts/dancing.lua:43: in function <data/talkactions/scripts/dancing.lua:39>
 
FIXED ALL!

#up
Im post new version without test, and this error is alocated - now no error!

#Chipsen
In Now posted version this bug is eliminated!
Now this command can be used at 999999999999 and more players in one time!

NOW FULLY TESTED!
 
PHP:
Lua Script Error: [TalkAction Interface]
data/talkactions/scripts/dancing.lua:onSay

data/talkactions/scripts/dancing.lua:48: attempt to index global 'events' (a nil
 value)
stack traceback:
        data/talkactions/scripts/dancing.lua:48: in function <data/talkactions/s
cripts/dancing.lua:44>


0.3.4PL2
 
Last edited:
I see, this script is very easy to add modifications!
I show you, how to add here it!
I make 1 mod to magic effets in dance!

Before:
PHP:
function dancer(tab)
    local dirs = {[0] = {1,3},[1] = {0,2},[2] = {1,3},[3] = {0,2}}
    local look = dirs[getCreatureLookDirection(tab[1])]
    doCreatureSetLookDir(tab[1], look[math.random(1,2)])
    tab[2].dancer = addEvent(dancer,conf.danceSpeed, {tab[1], tab[2]})
end

Add:
PHP:
function effectSender(tab)
    local effect = math.random(conf.effects[1], conf.effects[2]}
	doSendMagicEffect(getCreaturePosition(tab[1]), effect)	
	tab[2].effectSender = addEvent(effectSender,conf.effectSpeed, {tab[1], tab[2]})
end

Before:
PHP:
conf.danceTexts = {"GO GO DANCE!", "DANCE NOW!", "DANCE IS FUNY!"}
add:
PHP:
conf.effects = {1,33}
conf.effectSpeed = 2000

before:
PHP:
dancer({cid, events[pid]})
add:
PHP:
effectSender({cid, events[pid]})

and before:
PHP:
stopEvent(events[pid].dancer)

add:
PHP:
stopEvent(events[pid].effectSender)

and successfuly added!
 
I found a very evil bug :(

When u say !start dance and then logout then ui have increible buggs in u ots console :(

PLEASE FIX IT
 
Back
Top