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:51] 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 versionstill 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."+
-emote("puts some bricks on Cloud's backJUST 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> +
-<code lua> +
--- Kain give code +
-local ricevnum=7326 +
-local qvnum=14800 +
-  +
--- Does he want it? +
-if not(obj1.vnum==ricevnum) then +
-    say("I don't want this."+
-    mdo("give '%s' %s", obj1.name, ch.name) +
-    mdo("drop %s", obj1.name) +
-    return +
-end +
-  +
--- check if their 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)) +
-    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.name] and tracker[ch.name][obj1.vnum] then +
-    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>+luaquery saved queries (per char or global???)
  
-<code lua> +Tue Mar  3 14:39:04 2015::Dr. Vodur immtalks 'sql is tricky in its own right'\\ 
-say([[Yesthis is definitely the stone%sthank you again.  +Tue Mar  3 14:39:25 2015::Bobble immtalks 'with menu you mean an interactive mode with multiple inputs?'\\ 
-       I'll get right to work.]], ch.name) +Tue Mar  3 14:39:29 2015::Dr. Vodur immtalks 'yes'\\ 
-  +Tue Mar  3 14:39:53 2015::Bobble immtalks 'hmm.. not sure I'm so sold on that idea - I kinda like a simple query interface'\\ 
-  emote("rubs his hands around the {RResurrection Stone{x while nodding his head slowly."+Tue Mar  3 14:40:03 2015::Dr. Vodur immtalks 'well it will only be an option'\\ 
-  say("Yes, this is definitely the stone%sthank you againI'll get right to work.", ch.name) +Tue Mar  3 14:40:20 2015::Bobble immtalks 'nodjust not sure I would be using it much'\\ 
-  say("Come back and visit me in a few moments and I'll have a potion ready for you.")+Tue Mar  3 14:40:26 2015::Dr. Vodur immtalks 'and in the end it will spit out a full query syntax that you can share/reuse'\\ 
 +Tue Mar  3 14:40:44 2015::Bobble immtalks 'hmm.. that could be neat for learning I suppose'\\ 
 +Tue Mar  3 14:40:56 2015::Commander Astark immtalks 'yea.. I still use "help luaq" often enough'\\ 
 +Tue Mar  3 14:41:12 2015::Dr. Vodur immtalks 'anywayif you're serious, probably can also add support for select x,y,z from op where a and b and c syntax'\\ 
 +Tue Mar  3 14:41:28 2015::Bobble immtalks 'and it wouldn't be real SQL with nesting, joins or multiple tables..'\\ 
 +Tue Mar  3 14:41:33 2015::Bobble immtalks 'nod'\\ 
 +Tue Mar  3 14:41:40 2015::Dr. Vodur immtalks 'right, if it was just to that extent, it's not a big deal'\\ 
 +Tue Mar  3 14:41:54 2015::Bobble immtalks 'select [listfrom [typewhere [conditions]'\\ 
 +Tue Mar  3 14:42:26 2015::Bobble immtalks 'almost same as now but with keywords instead of quotation marks'\\ 
 +Tue Mar  3 14:42:31 2015::DrVodur immtalks 'right'\\ 
 +Tue Mar  3 14:43:00 2015::Dr. Vodur immtalks 'gotta support order by and top/bottom probably'\\ 
 +Tue Mar  3 14:43:16 2015::Bobble immtalks 'although could prolly drop the select which is just redundant'\\ 
 +Tue Mar  3 14:43:20 2015::DrVodur immtalks 'and add a keyword for limiting column width'\\ 
 +Tue Mar  3 14:43:40 2015::Bobble immtalks 'we're gonna create our own new language yet ;)'\\ 
 +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 vnumsubstr(name,0,10) from ...'\\ 
 +Tue Mar  3 14:45:10 2015::DrVodur immtalks 'actually it's already supported with current syntax so should be fine'\\ 
 +Tue Mar  3 14:45:38 2015::DrVodur immtalks 'name:sub(1,10i think would be the syntax'\\ 
 +Tue Mar  3 14:45:48 2015::Bobble immtalks 'yeah, that's even nicer'\\ 
 +Tue Mar  3 14:46:09 2015::DrVodur immtalks 'sounds fun, think i'll mess with it'\\ 
 +Tue Mar  3 14:46:19 2015::Bobble immtalks ':)'\\ 
 +Tue Mar  3 14:46:28 2015::Dr. Vodur immtalks 'would be more intuitive for me as well tbh'
  
-</code> 
lua/vodurtodo/vodur_s_todo.1420073460.txt.gz · Last modified: 2015/01/01 00:51 by vodur