This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
lua:scripting:examples:qtimerluavals [2014/12/31 19:20] vodur |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | <code lua> | ||
- | -- Kain GRALL code for sack of rice | ||
- | say("Keep counting kid... We'll work some of that fight out of you.") | ||
- | emote("puts some bricks on Cloud's back, JUST to make sure he gets a work out.") | ||
- | -- Kain greet code to start quest | ||
- | local ricevnum=7326 | ||
- | local qvnum=14800 | ||
- | -- Don't give quest if timer is still running | ||
- | if ch:qtimer(qvnum)>0 then | ||
- | say("You should give someone else a turn. Come back in %d hours", ch:qtimer(qvnum)) | ||
- | return | ||
- | end | ||
- | -- Don't talk them if already gave something | ||
- | tracker=tracker or {} | ||
- | if tracker[ch.name] then return end | ||
- | |||
- | say("Hey %s! I need some more weights for cloud. Can you bring me a '%s'?", | ||
- | ch.name, | ||
- | getobjproto(ricevnum).shortdescr) | ||
- | -- End Kain greet code | ||
- | </code> | ||