$include $lib/rp $include $lib/alynna $include $lib/gary'smufutils-strings $include $lib/colestats $def rpsys "$rpsystem" match $def line "^white^---------" 70 center .tell : statcolor[ str:color -- str:return ] var return color @ case "str" instring when "^red^" end "con" instring when "^cyan^" end "per" instring when "^green^" end "dex" instring when "^yellow^" end "spi" instring when "^purple^" end "int" instring when "^white^" end endcase ; : stancelevel case 3 = when "Berserking" end 2 = when "Reckless" end 1 = when "Aggressive" end 0 = when "Neutral" end -1 = when "Defensive" end -2 = when "Careful" end -3 = when "Paranoid" end endcase ; : levelstance case "Berserking" smatch when 3 end "Reckless" smatch when 2 end "Aggressive" smatch when 1 end "Neutral" smatch when 0 end "Defensive" smatch when -1 end "Careful" smatch when -2 end "Paranoid" smatch when -3 end pop 1 when 0 end endcase ; : alignmentlevel 100.0 / 0 round int case 10 = when "Hero" end 9 = when "Paladin" end 8 = when "Champion" end 7 = when "Champion" end 6 = when "Champion" end 5 = when "Principled" end 4 = when "Scrupulous" end 3 = when "Giving" end 2 = when "Kind" end 1 = when "Nice" end 0 = when "Neutral" end -1 = when "Apathetic" end -2 = when "Mean" end -3 = when "Bully" end -4 = when "Cruel" end -5 = when "Sadistic" end -6 = when "Dark" end -7 = when "Venomous" end -8 = when "Demonic" end -9 = when "Villain" end -10 = when "Villain" end endcase ; ( .------------------------------------------------------------------------------. | Wood Soul Primary | | Health: ###/### Yang Chi: ###/### Yin Chi: ###/### | |------------------------------------------------------------------------------| | Strength: ## Dexterity: ## Constitution: ## | | Intelligence: ## Perception: ## | |------------------------------------------------------------------------------| | Base Physical Damage: ### Base Magical Damage: ### | | Stance: Neutral Wimpy: Off Shards: #### | |------------------------------------------------------------------------------| | Earth: ## Fire: ## Metal: ## | | Wood: ## Water: ## | |------------------------------------------------------------------------------| | Insert Skill Data Here (Not Magical Spells, but skill levels) | '------------------------------------------------------------------------------' ) : primarysheet var target target ! 0 str target @ name "'s stats" cat 70 center .tell ".------------------------------------------------------------------------------." .tell str "|" " Psyche:" str target @ "Psyche" getstatstr dup toint if var tar toint #0 "Rankings/Psyche" getstatint / 1000000 + tar ! var val var rank #0 "@rp/Rankings/Psyche/" array_get_propvals dup array_count rank ! foreach swap toint val ! pop tar @ val @ > not if break then rank @ 1 - rank ! repeat rank @ 1 + english_number " Rank" then cat 16 right "|Strength:" str target @ "Strength" getstatstr dup toint if var tar toint #0 "Rankings/Strength" getstatint / 1000000 + tar ! var val var rank #0 "@rp/Rankings/Strength/" array_get_propvals dup array_count rank ! foreach swap toint val ! pop tar @ val @ > not if break then rank @ 1 - rank ! repeat rank @ 1 + english_number " Rank" then cat 17 right "|Endurance:" str target @ "Endurance" getstatstr dup toint if var tar toint #0 "Rankings/Endurance" getstatint / 1000000 + tar ! var val var rank #0 "@rp/Rankings/Endurance/" array_get_propvals dup array_count rank ! foreach swap toint val ! pop tar @ val @ > not if break then rank @ 1 - rank ! repeat rank @ 1 + english_number " Rank" then cat 15 right " |" cat .tell str "|" "" 23 right " |Warfare:" str target @ "Warfare" getstatstr dup toint if var tar toint 1000000 + tar ! var val var rank #0 "@rp/Rankings/Warfare/" array_get_propvals dup array_count rank ! foreach swap toint val ! pop tar @ val @ > not if break then rank @ 1 - rank ! repeat rank @ 1 + english_number " Rank" then cat 18 right "|" "" 25 right " |" cat .tell "|------------------------------------------------------------------------------|" .tell str target @ "@rp/Special/" array_get_propvals dup array_count not if pop "|" "No Powers." 78 center "|" cat .tell else var x 0 x ! foreach var cur var val toint val ! cur ! val @ case 1 = when "" end 2 = when "Advanced " end 3 = when "Exalted " end 4 = when "Legendary " end endcase cur @ capitalize strcat 36 left x @ 1 + x ! repeat 2 x @ 2 for pop " " swap strcat strcat " |" strcat "| " swap strcat .tell repeat x @ 2 % if "" 36 right strcat " |" strcat "| " swap strcat .tell then then "|------------------------------------------------------------------------------|" .tell str target @ "@rp/Ally/" array_get_propvals dup array_count not if pop "|" "No Allies." 78 center "|" cat .tell else var x 0 x ! foreach var cur var val val ! cur ! " " cur @ capitalize strcat ":" strcat 22 left val @ tostr 2 right strcat x @ 1 + x ! repeat 3 x @ 3 for pop "|" swap strcat strcat "|" swap strcat strcat " |" strcat "| " swap strcat .tell repeat x @ 3 % if 2 x @ 3 % 1 for pop strcat repeat 78 center "|" strcat "|" swap strcat .tell then then "|------------------------------------------------------------------------------|" .tell str "|" "Stuff: " target @ "Stuff" getstatint tostr strcat 78 center "|" cat .tell "'------------------------------------------------------------------------------'" .tell ; : chargen "YOU ARE IN CHARGEN!" .tell 2 sleep me @ "+sheet CHARGEN23" force ; lvar stuff : chargenner { "Welcome to Southern Cross MUD. We're glad that you're making a character here." "Before you can start exploring this world, you have to select the priority of" "Your attributes. To do this, type in a list of the abbreviations in the order" "of priority. For example:" " " "STR INT DEX CON SPI PER" "INT SPI PER STR CON DEX" " " "Strength - Your physical ability to exert force on objects. Determines your" " maximum carrying capacity and how hard you hit with most weapons." "Dexterity - Your speed, sureness of movement, and agility. It helps you to" " dodge incoming blows and land blows of your own." "Constitution - Your health and vitality. It helps you withstand more suffering" " and pain without flinching." "Intelligence - Your IQ and ability to reason things properly." "Spirit - Your link to all things magic. A high spirit is essential for any" " would be mage." "Perception - Hand-eye coordination, ability to notice things, and, to some" " extent, how paranoid you are." "Choice>" }list me @ 1 array_make array_notify read strip toupper stuff ! stuff @ not if chargenner exit then stuff @ "help" instring if me @ str "+help " stuff @ " " split swap pop cat force chargenner exit then stuff @ " " explode array_make stuff ! stuff @ array_count 6 = not if { "Type in a list of the abbreviations in the order" "of priority. For example:" " " "STR INT DEX CON SPI PER" "INT SPI PER STR CON DEX" " " " " " " " " }list me @ 1 array_make array_notify chargenner exit then "STR INT DEX CON SPI PER" " " explode array_make stuff @ array_diff if { "Type in a list of the abbreviations in the order" "of priority. For example:" " " "STR INT DEX CON SPI PER" "INT SPI PER STR CON DEX" " " " " " " " " }list me @ 1 array_make array_notify chargenner exit then var cur stuff @ array_reverse foreach stuff ! 1 + cur ! cur @ case 1 = when random 15 % 31 + end 2 = when random 10 % 31 + end 3 = when random 10 % 31 + end 4 = when random 10 % 21 + end 5 = when random 10 % 21 + end 6 = when random 14 % 16 + end endcase stuff @ case "PER" smatch when "Perception" end "STR" smatch when "Strength" end "CON" smatch when "Constitution" end "SPI" smatch when "Spirit" end "DEX" smatch when "Dexterity" end "INT" smatch when "Intelligence" end endcase stuff ! me @ stuff @ rot setstat me @ str "Priority/" stuff @ cat cur @ setstat 0 until "You now have basic stats and are ready to play. Good luck! Use the [pub]lic channel to ask questions." .tell me @ #7594 moveto me @ "@mcomm/public" "yes" setprop me @ "@mcomm/info" "yes" setprop "It is suggested you type config and set things as you want them, also use option 3 to select a country and again to pick a country-based class to start with." .tell ; : stancer[ str:target -- ] me @ "Stance" getmodstatint 1 + dup 3 > if pop -3 then target @ if target @ levelstance then me @ "Stance" rot setstat str "You are now ^green^" me @ "Stance" getmodstatint stancelevel "^normal^!" cat .tell ; : wimpy[ str:target -- ] target @ atoi target ! target @ not if "You are now in brave mode and will not run." .tell me @ "Wimpy" 0 setstat exit then target @ 0 greater 50 lesser target ! str "You will now flee if you are reduced to " target @ "% hit points." cat .tell me @ "Wimpy" target @ setstat ; : resistances[ ref:target -- ] var stat var value var toggle var string "" string ! str "|" "Resistances" 78 center "|" cat .tell target @ "@rp/" array_get_propvals foreach value ! stat ! stat @ "resistance" instring not if continue then stat @ tolower "" "resistance" subst capitalize stat ! stat @ "none" smatch if continue then str stat @ 10 left ":" target @ stat @ ( resistance ) dup 0 > if "^green^" else "^red^" then swap tostr 5 right "^normal^% |" cat string @ swap strcat string ! toggle @ 1 + toggle ! toggle @ 3 = if 0 toggle ! string @ 70 center .tell "" string ! then 0 until toggle @ if string @ 70 center .tell then ; PUBLIC Resistances : main var target strip target ! trigger @ #-1 dbcmp if chargen exit then command @ "wimpy" smatch if target @ wimpy exit then command @ "stance" instring if target @ stancer exit then target @ "CHARGEN23" smatch if chargenner exit then me @ mlevel 3 > target @ and if target @ match dup not if pop target @ pmatch then target ! else me @ target ! then target @ ok? not if "Invalid Target" .tell exit then target @ exit? target @ room? or if "Invalid Target" .tell exit then target @ primarysheet ; PUBLIC primarysheet $libdef primarysheet