Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:load:{
- write rpg.txt 0
- }
- on *:connect:{
- var %x 0
- var %y $read(rpg.txt,-1)
- while %x < %y {
- hload -si $gettok($read(rpg.txt,%y),1,32) rpg.ini $gettok($read(rpg.txt,%y),1,32)
- inc %x
- }
- }
- on *:TEXT:.register*:*: {
- if !$2 {
- query $nick Required form: .register <name>
- }
- else {
- query $nick Your name is now registered! Please do .pass to set your password. Doing .pass will give you instructions.
- hmake $nick
- hadd $nick name $2
- hadd $nick pass $nick
- hadd $nick cash 1000
- hadd $nick atk 5
- hadd $nick def 5
- hadd $nick atk_mod 0
- hadd $nick def_mod 0
- hadd $nick points 0
- hadd $nick level 1
- hsave -i $nick rpg.ini $hget($nick,name)
- write -l1 rpg.txt $calc($read(rpg.txt,-1) + 1)
- write rpg.txt $nick $2
- msg # Welcome to RPG, $2
- notice $nick Type !help for a list of commands.
- }
- }
- on *:TEXT:.pass*:?: {
- if !$2 || !$3 {
- query $nick Required Form: .pass <oldpass> <newpass>. If you have not yet created a password, simply use your username as your old pass. Exp: !pass bot botpass, would make "Bot"'s pass now "botpass"
- }
- else {
- if ($2 == $hget($nick,pass) {
- hadd $nick pass $3
- query $nick Your password is now $3
- }
- }
- }
- on *:text:.buy*:%channel: {
- if !$hget($nick) {
- notice $nick .register <nick>
- }
- if $hget($nick,jail) {
- msg $chan You can't do that while in jail, $nick!
- }
- else {
- if !$2 {
- notice $nick Shops: Armor; Weapon; Car;
- halt
- }
- if $2 = armor {
- notice $nick Armors: Bulletproof Vest [bpvest] $+($chr(36),500,;)
- }
- if $2 = weapon {
- notice $nick Weapons: Machette [machette] $+($chr(36),500,;) - Glock [glock] $+($chr(36),750,;)
- }
- }
- if $2 !isnum {
- notice $nick .buy <num> <item>
- halt
- }
- ;########### ARMORS ###########
- if $2 isnum && $3 == bpvest {
- var %cash $calc($2 * 200)
- if $hget($nick,cash) >= %cash {
- hadd $nick cash $calc($hget($nick,cash) - %cash)
- hadd $nick bp_vest $calc($hget($nick,bp_vest) + $2)
- hadd $nick def_mod $calc($hget($nick,def_mod) + (2 * $2))
- hadd $nick atk_mod $calc($hget($nick,atk_mod) + (1 * $2))
- msg # $nick buys $2 Bulletproof Vest.
- }
- }
- if $2 isnum && $3 == sheild {
- var %cash $calc($2 * 500)
- if $hget($nick,cash) >= %cash {
- hadd $nick cash $calc($hget($nick,chas) - %cash)
- hadd $nick sheild $calc($hget($nick,sheild) + $2)
- hadd $nick def_mod $calc($hget($nick,def_mod) + (4 * $2))
- hadd $nick atk_mod $calc($hget($nick,atk_mod) + (1 * $2))
- msg # $nick buys $2 Sheild.
- }
- }
- ;########### WEAPONS ###########
- if $2 isnum && $3 == machette {
- var %cash $calc($2 * 250)
- if $hget($nick,cash) >= %cash {
- hadd $nick cash $calc($hget($nick,cash) - %cash)
- hadd $nick machette $calc($hget($nick,machette) + $2)
- hadd $nick def_mod $calc($hget($nick,def_mod) + (1 * $2))
- hadd $nick atk_mod $calc($hget($nick,atk_mod) + (3 * $2))
- .msg # $nick buys $2 Machette.
- }
- }
- if $2 isnum && $3 == glock {
- var %cash $calc($2 * 500)
- if $hget($nick,cash) >= %cash {
- hadd $nick cash $calc($hget($nick,cash) - %cash)
- hadd $nick glock $calc($hget($nick,glock) + $2)
- hadd $nick def_mod $calc($hget($nick,def_mod) + (2 * $2))
- hadd $nick atk_mod $calc($hget($nick,atk_mod) + (4 * $2))
- .msg # $nick buys $2 Glock.
- }
- }
- if $2 isnum && $3 == bat {
- var %cash $calc($2 * 100)
- if $hget($nick,cash) >= %cash {
- hadd $nick cash $calc($hget($nick,cash) - %cash)
- hadd $nick bat $calc($hget($nick,bat) + $2)
- hadd $nick def_mod $calc($hget($nick,def_mod) + (1 * $2))
- hadd $nick atk_mod $calc($hget($nick,atk_mod) + (2 * $2))
- msg # $nick buys $2 bat
- }
- }
- if $2 isnum && $3 == chainsaw {
- var %cash $calc($2 * 750)
- if $hget($nick,cash) >= %cash {
- hadd $nick cash $calc($hget($nick,cash) - %cash)
- hadd $nick chainsaw $calc($hget($nick,chainsaw) + $2)
- hadd $nick def_mod $calc($hget($nick,def_mod) + (1 * $2))
- hadd $nick atk_mod $calc($hget($nick,atk_mod) + (6 * $2))
- msg # $nick buys $2 chainsaw.
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement