User Tools

Site Tools


lua:vodurtodo:vodur_s_todo

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
lua:vodurtodo:vodur_s_todo [2015/01/01 00:50] vodurlua:vodurtodo:vodur_s_todo [2015/03/03 21:48] (current) vodur
Line 43: Line 43:
 fix more appropriate CH methods to be globals fix more appropriate CH methods to be globals
  
-<code lua> +luaquery menu based version, still spits out full luaq args at the end so you can share or whatev 
--- Kain GRALL code for sack of rice + 
-say("Keep counting kid... We'll work some of that fight out of you.") +luaquery saved queries (per char or global???
-emote("puts some bricks on Cloud's back, JUST to make sure he gets a work out."+ 
--- Kain greet code to start quest +Tue Mar  3 14:39:04 2015::Dr. Vodur immtalks 'sql is tricky in its own right'\\ 
-local ricevnum=7326 +Tue Mar  3 14:39:25 2015::Bobble immtalks 'with menu you mean an interactive mode with multiple inputs?'\\ 
-local qvnum=14800 +Tue Mar  3 14:39:29 2015::DrVodur immtalks 'yes'\\ 
--- Don't give quest if timer is still running +Tue Mar  3 14:39:53 2015::Bobble immtalks 'hmm.not sure I'm so sold on that idea - I kinda like simple query interface'\\ 
-if ch:qtimer(qvnum)>0 then  +Tue Mar  3 14:40:03 2015::Dr. Vodur immtalks 'well it will only be an option'\\ 
-    say("You should give someone else a turnCome back in %d hours", ch:qtimer(qvnum)) +Tue Mar  3 14:40:20 2015::Bobble immtalks 'nodjust not sure I would be using it much'\\ 
-    return  +Tue Mar  3 14:40:26 2015::DrVodur immtalks 'and in the end it will spit out a full query syntax that you can share/reuse'\\ 
-end +Tue Mar  3 14:40:44 2015::Bobble immtalks 'hmm.. that could be neat for learning suppose'\\ 
--- Don't talk them if already gave something +Tue Mar  3 14:40:56 2015::Commander Astark immtalks 'yea.. I still use "help luaqoften enough'\\ 
-tracker=tracker or {} +Tue Mar  3 14:41:12 2015::DrVodur immtalks 'anywayif you're serious, probably can also add support for select x,y,z from op where a and b and c syntax'\\ 
-if tracker[ch.name] then return end +Tue Mar  3 14:41:28 2015::Bobble immtalks 'and it wouldn't be real SQL with nestingjoins or multiple tables..'\\ 
-  +Tue Mar  3 14:41:33 2015::Bobble immtalks 'nod'\\ 
-say("Hey %s! need some more weights for cloud. Can you bring me a '%s'?", +Tue Mar  3 14:41:40 2015::Dr. Vodur immtalks 'right, if it was just to that extent, it's not a big deal'\\ 
-    ch.name+Tue Mar  3 14:41:54 2015::Bobble immtalks 'select [listfrom [typewhere [conditions]'\\ 
-    getobjproto(ricevnum).shortdescr) +Tue Mar  3 14:42:26 2015::Bobble immtalks 'almost same as now but with keywords instead of quotation marks'\\ 
--- End Kain greet code +Tue Mar  3 14:42:31 2015::Dr. Vodur immtalks 'right'\\ 
-</code> +Tue Mar  3 14:43:00 2015::DrVodur immtalks 'gotta support order by and top/bottom probably'\\ 
-<code lua> +Tue Mar  3 14:43:16 2015::Bobble immtalks 'although could prolly drop the select which is just redundant'\\ 
--- Kain give code +Tue Mar  3 14:43:20 2015::DrVodur immtalks 'and add a keyword for limiting column width'\\ 
-local ricevnum=7326 +Tue Mar  3 14:43:40 2015::Bobble immtalks 'we're gonna create our own new language yet ;)'\\ 
-local qvnum=14800 +Tue Mar  3 14:44:23 2015::Bobble immtalks 'hmm.. transformation functions in the select part maybe? like..'\\ 
-  +Tue Mar  3 14:45:00 2015::Bobble immtalks 'luaq vnum, substr(name,0,10from ...'\\ 
--- Does he want it? +Tue Mar  3 14:45:10 2015::Dr. Vodur immtalks 'actually it's already supported with current syntax so should be fine'\\ 
-if not(obj1.vnum==ricevnum) then +Tue Mar  3 14:45:38 2015::DrVodur immtalks 'name:sub(1,10i think would be the syntax'\\ 
-    say("don't want this.") +Tue Mar  3 14:45:48 2015::Bobble immtalks 'yeah, that'even nicer'\\ 
-    mdo("give '%s' %s", obj1.name, ch.name) +Tue Mar  3 14:46:09 2015::Dr. Vodur immtalks 'sounds funthink i'll mess with it'\\ 
-    mdo("drop %s", obj1.name) +Tue Mar  3 14:46:19 2015::Bobble immtalks ':)'\\ 
-    return +Tue Mar  3 14:46:28 2015::DrVodur immtalks 'would be more intuitive for me as well tbh'
-end +
-  +
--- check if their timer is still running +
-if ch:qtimer(qvnum)>0 then +
-    say("You should give someone else a turnCome back in %d hours"ch:qtimer(qvnum)) +
-    mdo("give '%s%s"obj1.name, ch.name) +
-    mdo("drop %s", obj1.name) +
-    return +
-end +
-  +
--- check if already gave that one +
-tracker=tracker or {} +
-if tracker[ch.nameand tracker[ch.name][obj1.vnumthen +
-    say("You already gave me that!") +
-    mdo("give '%s%s", obj1.name, ch.name) +
-    mdo("drop %s", obj1.name) +
-    return +
-end +
-  +
--- He really wants it! +
-if tracker[ch.name]==nil then +
-    tracker[ch.name]={} +
-end +
-tracker[ch.name][obj1.vnum]=true +
-say("Thanks %s!"ch.name) +
-  +
--- Now see if finished +
-if tracker[ch.name][ricevnum] then -- Has the rice +
-    qset(ch, qvnum, 1, 23) +
-    say("Haha! Cloud will be strong in no time with this kind of weight!") +
-    mdo("mob junk '%s'"obj1.name) +
-    reward(ch, "qp", 15+
-    tracker[ch.name]=nil +
-else +
-    say("I still need a %s", getobjproto( (not(tracker[ch.name][ricevnum]))).shortdescr) +
-end +
-  +
--- End Kain give code+
  
-</code> 
lua/vodurtodo/vodur_s_todo.1420073419.txt.gz · Last modified: 2015/01/01 00:50 by vodur