User Tools

Site Tools


lua:scripting:astarkspank

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
lua:scripting:astarkspank [2014/12/24 04:55]
vodur
— (current)
Line 1: Line 1:
-Place 100 random Astarks in luai: 
- 
-<code lua>for i=1,100 do   ​getrandomroom():​mload(4849) 
-end 
-</​code>​ 
- 
-<​code>​ 
-Name:        [commander astar] 
- 
-Area:        [  142] Special Gear 
- 
-Act:         [npc sentinel no_track trigger_always no_quest safe traveller] 
- 
-Vnum:        [ 4849]         Sex: [male   ​] ​    Race: [minotaur] 
- 
-Level: ​      ​[ ​ 0]         ​Align:​ [   0] 
- 
-Hitroll: ​    ​[100%= ​   0] Damage: [100%= ​   2] Dam Type: [none] 
- 
-Hitpoints: ​  ​[100%= ​  ​50] ​  Mana: [100%= ​  ​50] ​    Move: [100%= ​  50] 
- 
-Armor: ​      ​[100%= ​ 100]  Saves: [100%= ​   0] 
- 
-Affected by: [dark_vision] 
- 
-Form:        [edible sentient biped mammal] 
- 
-Parts: ​      [head arms legs heart brains guts hands feet fingers ear eye tail horns] 
- 
-Imm:         ​[summon] 
- 
-Res:         [bash cold] 
- 
-Vuln:        [disease] 
- 
-Off:         ​[none] 
- 
-Size:        [huge] 
- 
-Start pos.   ​[standing] 
- 
-Default pos  [standing] 
- 
-Wealth: ​     [100%=0] 
- 
-Stance: ​     [default] 
- 
-Short descr: Commander Astark 
- 
-Long descr: 
- 
-Commander Astark is here with a swollen behind 
- 
-Description:​ 
- 
-It's the BIRTHDAY BOY. 
- 
-Comments: 
- 
-Astark'​s bday quest mob. 
- 
-MOBPrograms for [ 4849]: 
- 
- ​Number Vnum Trigger Phrase 
- 
- ​------ ---- ------- ------ 
- 
-[    0] 4849   TIMER 300 
- 
-[    1] 4849  SOCIAL spank 
-</​code>​ 
- 
-<code lua>​local lettervnum=31450 
-local bname="​Vodur"​ 
-local bcolor="​{m"​ 
- 
-local qpreward=29 
--- try to make word out of obj and all letters in cont 
--- return true if doesn'​t make word or return false 
--- and reward qp and destroy the letters 
-function put_trigger( ch, cont ) 
-    local letters={} 
-    for i=1,#bname do 
-        letters[i]=bname:​sub(i,​i) 
-    end 
- 
-    local items={ obj } 
-    for k,v in pairs(cont.contents) do 
-        if v.vnum==lettervnum then 
-            table.insert(items,​ v) 
-        end 
-    end 
- 
-    local used={} 
-    for k,v in pairs(items) do 
-        local iletter=string.match(v.name,​ "​letter (%a)") 
-        for i=#​letters,​1,​-1 do 
-            if iletter==letters[i] then 
-                table.insert(used,​ v) 
-                table.remove(letters,​i) 
-                break 
-            end 
-        end 
-    end 
- 
-    if #​letters<;;​1 then 
-        sendtochar( ch, "The letters merge together to form the word "​..bcolor..bname.."​{x!"​.. 
-        "​\n\rAfter an instant it vanishes completely.\n\r"​) 
-        ch:​reward(ch,​ "​qp",​ qpreward) 
- 
-        for k,v in pairs(used) do 
-            v:destroy() 
-        end 
-        return false 
-    end 
- 
-    return true 
-end 
- 
-function make_letter(l) 
-    if not(l.vnum == lettervnum) then 
-        error("​wtf"​) 
-    end 
- 
-    local letters={} 
-    for i=1,#bname do 
-        letters[i]=bname:​sub(i,​i) 
-    end 
- 
-    local letter=letters[randnum(1,​ #letters)] 
- 
-    l.name="​letter "​..letter 
-    l.shortdescr="​the letter "​..bcolor..letter.."​{x"​ 
-    l.description="​It'​s a letter. Put it in a container with other letters and see what happens!"​ end 
-</​code>​ 
  
lua/scripting/astarkspank.1419396936.txt.gz ยท Last modified: 2014/12/24 04:55 by vodur