Advertisement
Thelorgoreng

rpg game( chatango bot )

Sep 2nd, 2015
661
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 29.50 KB | None | 0 0
  1. ##by 0rx,thelorgorenk,agunq
  2. ##RPGGAME!!
  3. if cmd=="rpgstart":
  4.           if user.name in rank5 or user.name in rank4:
  5.            rpgbool=True
  6.            room.message("RPG actived // commands - .hunt .bosshunt .weaponshop .wakeup .stats")
  7.           else:
  8.            room.message("Sorry only rank 4,5 can start this :|")
  9.         #end
  10.         elif cmd =="rpgend":
  11.           if user.name in rank5 or user.name in rank4 and user.name in rank1:
  12.             rpgbool=False
  13.             bossparty=False
  14.             room.message("RPG has been End!")
  15.           else:
  16.             room.message("Sorry only rank 4,5 can end this :|")
  17.  
  18.         ##Debut/Starter
  19.         elif rpgbool==True and (cmd == "rest" or cmd == "wakeup"):
  20.           user = user.name.lower()
  21.           if user in bosshunt or user in monhunt: return
  22.           if user in rpg:
  23.             weapon, hp, lvl, exp = json.loads(rpg[user])
  24.             rpg[user] = json.dumps([weapon, hp, lvl, exp])
  25.             hp, lvl=int(hp),int(lvl)
  26.             if lvl == 1:
  27.               hp=2000
  28.             elif lvl == 2:
  29.               hp=2500
  30.             elif lvl == 3:
  31.               hp=3000
  32.             elif lvl == 4:
  33.               hp=3500
  34.             elif lvl == 5:
  35.               hp=4000
  36.             elif lvl == 6:
  37.               hp=5000
  38.             elif lvl == 7:
  39.               hp=6000
  40.             elif lvl == 8:
  41.               hp=7000
  42.             elif lvl == 9:
  43.               hp=8500
  44.             elif lvl == 10:
  45.               hp=10000
  46.             elif lvl == 11:
  47.               hp=11500
  48.             elif lvl == 12:
  49.               hp=13000
  50.             elif lvl == 13:
  51.               hp=15000
  52.             elif lvl == 14:
  53.               hp=17000
  54.             elif lvl == 15:
  55.               hp=20000
  56.             elif lvl == 16:
  57.               hp=22000
  58.             elif lvl == 17:
  59.               hp=24000
  60.             elif lvl == 18:
  61.               hp=26000
  62.             elif lvl == 19:
  63.               hp=28000
  64.             elif lvl == 20:
  65.               hp=30000
  66.             elif lvl == 21:
  67.               hp=33000
  68.             elif lvl == 22:
  69.               hp=35000
  70.             elif lvl == 23:
  71.               hp=37000
  72.             elif lvl == 24:
  73.               hp=40000
  74.             elif lvl == 25:
  75.               hp=42000
  76.             elif lvl == 26:
  77.               hp=44000
  78.             elif lvl == 27:
  79.               hp=46000
  80.             elif lvl == 28:
  81.               hp=48000
  82.             elif lvl == 29:
  83.               hp=50000
  84.             elif lvl == 30:
  85.               hp=55000
  86.             hp , lvl = str(hp),str(lvl)
  87.             room.message("Halo %s, Hello, you're sleeping. Here is your stats:<br> -Hp: %s<br> -LVL: %s<br> -EXP: %s" % (user, str(hp), str(lvl), str(exp)), True)
  88.             rpg[user] = json.dumps([weapon,hp,lvl,exp])
  89.           else:
  90.             hp=2000
  91.             weapon=random.choice(weaponlist)
  92.             lvl=1
  93.             exp=0
  94.             hp = str(hp)
  95.             lvl=str(lvl)
  96.             exp=str(exp)
  97.             room.message("%s Hello, Welcome To RPG GAME!!. Here is you're new stats:<br> -HEALTH : %s <br> -LVL: %s <br> -EXP: %s" % (user, str(hp), str(lvl), str(exp)), True)
  98.             rpg[user] = json.dumps([weapon,hp,lvl,exp])
  99.  
  100.         ##inn                  
  101.  
  102.         elif rpgbool==True and (cmd =="heal" or cmd == "h"):
  103.           user = user.name.lower()
  104.           if user not in rpg: return
  105.           hpfull = ""
  106.           heal = ""
  107.           if user in monhunt or user in bosshunt:
  108.             weapon , hp , lvl , exp = json.loads(rpg[user])
  109.             hp , lvl=int(hp),int(lvl)
  110.             if hp < 2000 and lvl == 1:
  111.               heal = random.randint(100,300)
  112.               hp = hp + heal
  113.               if hp + heal >= 2000:
  114.                 hp = 2000
  115.                 heal = 0
  116.                 hpfull = hp = 2000
  117.                 hp , lvl= str(hp),str(lvl)
  118.                 rpg[user] = json.dumps([weapon,hp,lvl,exp])
  119.                 room.message("You're health <f x1200F='1'>is full :)")
  120.             elif hp < 2500 and lvl == 2:
  121.               heal = random.randint(150,400)
  122.               hp = hp + heal
  123.               if hp + heal >= 2500:
  124.                 hp = 2500
  125.                 heal = 0
  126.                 hpfull = hp = 2500
  127.                 hp , lvl= str(hp),str(lvl)
  128.                 rpg[user] = json.dumps([weapon,hp,lvl,exp])
  129.                 room.message("<f x123333FF='1'>You're health <f x1200F='1'>is full :)")
  130.             elif hp < 3000 and lvl == 3:
  131.               heal = random.randint(250,500)
  132.               hp = hp + heal
  133.               if hp + heal >= 3000:
  134.                 hp = 3000
  135.                 heal = 0
  136.                 hpfull = hp = 3000
  137.                 hp , lvl= str(hp),str(lvl)
  138.                 rpg[user] = json.dumps([weapon,hp,lvl,exp])
  139.                 room.message("You're health <f x1200F='1'>is full :)")
  140.             elif hp < 3500 and lvl == 4:
  141.               heal = random.randint(350,650)
  142.               hp = hp + heal
  143.               if hp + heal >= 3500:
  144.                 heal = 0
  145.                 hp=3500
  146.                 hpfull = hp = 3500
  147.                 hp , lvl= str(hp),str(lvl)
  148.                 rpg[user] = json.dumps([weapon,hp,lvl,exp])
  149.                 room.message("You're health <f x1200F='1'>is full :)")
  150.             elif hp < 4000 and lvl == 5:
  151.               heal = random.randint(400,800)
  152.               hp = hp + heal
  153.               if hp + heal >= 4000:
  154.                 heal = 0
  155.                 hp=4000
  156.                 hpfull = hp = 4000
  157.                 hp , lvl= str(hp),str(lvl)
  158.                 rpg[user] = json.dumps([weapon,hp,lvl,exp])
  159.                 room.message("You're health <f x1200F='1'>is full :)")
  160.             elif hp < 5000 and lvl == 6:
  161.               heal = random.randint(500,950)
  162.               hp = hp + heal
  163.               if hp + heal >= 5000:
  164.                 heal = 0
  165.                 hp=5000
  166.                 hpfull = hp = 5000
  167.                 hp , lvl= str(hp),str(lvl)
  168.                 rpg[user] = json.dumps([weapon,hp,lvl,exp])
  169.                 room.message("You're health <f x1200F='1'>is full :)")
  170.             elif hp < 6000 and lvl == 7:
  171.               heal = random.randint(800,1000)
  172.               hp = hp + heal
  173.               if hp + heal >= 6000:
  174.                 heal = 0
  175.                 hp=6000
  176.                 hpfull = hp = 6000
  177.                 hp , lvl= str(hp),str(lvl)
  178.                 rpg[user] = json.dumps([weapon,hp,lvl,exp])
  179.                 room.message("You're health <f x1200F='1'>is full :)")
  180.             elif hp < 7000 and lvl == 8:
  181.               heal = random.randint(900,1150)
  182.               hp = hp + heal
  183.               if hp + heal >= 7000:
  184.                 heal = 0
  185.                 hp=7000
  186.                 hpfull = hp = 7000
  187.                 hp , lvl= str(hp),str(lvl)
  188.                 rpg[user] = json.dumps([weapon,hp,lvl,exp])
  189.                 room.message("You're health <f x1200F='1'>is full :)")
  190.             elif hp < 8500 and lvl == 9:
  191.               heal = random.randint(950,1200)
  192.               hp = hp + heal
  193.               if hp + heal >= 8500:
  194.                 heal = 0
  195.                 hp=8500
  196.                 hpfull = hp = 8500
  197.                 hp , lvl= str(hp),str(lvl)
  198.                 rpg[user] = json.dumps([weapon,hp,lvl,exp])
  199.                 room.message("You're health <f x1200F='1'>is full :)")
  200.             elif hp < 10000 and lvl == 10:
  201.               heal = random.randint(1000,1300)
  202.               hp = hp + heal
  203.               if hp + heal >= 10000:
  204.                 heal = 0
  205.                 hp=10000
  206.                 hpfull = hp = 10000
  207.                 hp , lvl= str(hp),str(lvl)
  208.                 rpg[user] = json.dumps([weapon,hp,lvl,exp])
  209.                 room.message("You're health <f x1200F='1'>is full :)")
  210.             elif hp < 11500 and lvl == 11:
  211.               heal = random.randint(1050,1350)
  212.               hp = hp + heal
  213.               if hp + heal >= 11500:
  214.                 heal = 0
  215.                 hp=11500
  216.                 hpfull = hp = 11500
  217.                 hp , lvl= str(hp),str(lvl)
  218.                 rpg[user] = json.dumps([weapon,hp,lvl,exp])
  219.                 room.message("You're health <f x1200F='1'>is full :)")
  220.             elif hp < 13000 and lvl == 12:
  221.               heal = random.randint(1300,1500)
  222.               hp = hp + heal
  223.               if hp + heal >= 13000:
  224.                 heal = 0
  225.                 hp=13000
  226.                 hpfull = hp = 13000
  227.                 hp , lvl= str(hp),str(lvl)
  228.                 rpg[user] = json.dumps([weapon,hp,lvl,exp])
  229.                 room.message("You're health <f x1200F='1'>is full :)")
  230.             elif hp < 15000 and lvl == 13:
  231.               heal = random.randint(1400,1550)
  232.               hp = hp + heal
  233.               if hp + heal >= 15000:
  234.                 heal = 0
  235.                 hp=15000
  236.                 hpfull = hp = 15000
  237.                 hp , lvl= str(hp),str(lvl)
  238.                 rpg[user] = json.dumps([weapon,hp,lvl,exp])
  239.                 room.message("You're health <f x1200F='1'>is full :)")
  240.             elif hp < 17000 and lvl == 14:
  241.               heal = random.randint(1500,1650)
  242.               hp = hp + heal
  243.               if hp + heal >= 17000:
  244.                 heal = 0
  245.                 hp=17000
  246.                 hpfull = hp = 17000
  247.                 hp , lvl= str(hp),str(lvl)
  248.                 rpg[user] = json.dumps([weapon,hp,lvl,exp])
  249.                 room.message("You're health <f x1200F='1'>is full :)")
  250.             elif hp < 20000 and lvl == 15:
  251.               heal = random.randint(1700,1900)
  252.               hp = hp + heal
  253.               if hp + heal >= 20000:
  254.                 heal = 0
  255.                 hp=20000
  256.                 hpfull = hp = 20000
  257.                 hp , lvl= str(hp),str(lvl)
  258.                 rpg[user] = json.dumps([weapon,hp,lvl,exp])
  259.                 room.message("You're health <f x1200F='1'>is full :)")
  260.             elif hp < 22000 and lvl == 16:
  261.               heal = random.randint(1800,2100)
  262.               hp = hp + heal
  263.               if hp + heal >= 22000:
  264.                 heal = 0
  265.                 hp=22000
  266.                 hpfull = hp = 22000
  267.                 hp , lvl= str(hp),str(lvl)
  268.                 rpg[user] = json.dumps([weapon,hp,lvl,exp])
  269.                 room.message("You're health <f x1200F='1'>is full :)")
  270.             elif hp < 24000 and lvl == 17:
  271.               heal = random.randint(1900,2150)
  272.               hp = hp + heal
  273.               if hp + heal >= 24000:
  274.                 heal = 0
  275.                 hp=24000
  276.                 hpfull = hp = 24000
  277.                 hp , lvl= str(hp),str(lvl)
  278.                 rpg[user] = json.dumps([weapon,hp,lvl,exp])
  279.                 room.message("You're health <f x1200F='1'>is full :)")
  280.             elif hp < 26000 and lvl == 18:
  281.               heal = random.randint(2000,2350)
  282.               hp = hp + heal
  283.               if hp + heal >= 26000:
  284.                 heal = 0
  285.                 hp=26000
  286.                 hpfull = hp = 26000
  287.                 hp , lvl= str(hp),str(lvl)
  288.                 rpg[user] = json.dumps([weapon,hp,lvl,exp])
  289.                 room.message("You're health <f x1200F='1'>is full :)")
  290.             elif hp < 28000 and lvl == 19:
  291.               heal = random.randint(2200,2500)
  292.               hp = hp + heal
  293.               if hp + heal >= 28000:
  294.                 heal = 0
  295.                 hp=28000
  296.                 hpfull = hp = 28000
  297.                 hp , lvl= str(hp),str(lvl)
  298.                 rpg[user] = json.dumps([weapon,hp,lvl,exp])
  299.                 room.message("You're health <f x1200F='1'>is full :)")
  300.             elif hp < 30000 and lvl == 20:
  301.               heal = random.randint(2700,2850)
  302.               hp = hp + heal
  303.               if hp + heal >= 30000:
  304.                 heal = 0
  305.                 hp=30000
  306.                 hpfull = hp = 30000
  307.                 hp , lvl= str(hp),str(lvl)
  308.                 rpg[user] = json.dumps([weapon,hp,lvl,exp])
  309.                 room.message("You're health <f x1200F='1'>is full :)")
  310.             elif hp < 33000 and lvl == 21:
  311.               heal = random.randint(2800,3000)
  312.               hp = hp + heal
  313.               if hp + heal >= 33000:
  314.                 heal = 0
  315.                 hp=33000
  316.                 hpfull = hp = 33000
  317.                 hp , lvl= str(hp),str(lvl)
  318.                 rpg[user] = json.dumps([weapon,hp,lvl,exp])
  319.                 room.message("You're health <f x1200F='1'>is full :)")
  320.             elif hp < 35000 and lvl == 22:
  321.               heal = random.randint(2900,3200)
  322.               hp = hp + heal
  323.               if hp + heal >= 35000:
  324.                 heal = 0
  325.                 hp=35000
  326.                 hpfull = hp = 35000
  327.                 hp , lvl= str(hp),str(lvl)
  328.                 rpg[user] = json.dumps([weapon,hp,lvl,exp])
  329.                 room.message("You're health <f x1200F='1'>is full :)")
  330.             elif hp < 37000 and lvl == 23:
  331.               heal = random.randint(3000,3250)
  332.               hp = hp + heal
  333.               if hp + heal >= 37000:
  334.                 heal = 0
  335.                 hp=37000
  336.                 hpfull = hp = 37000
  337.                 hp , lvl= str(hp),str(lvl)
  338.                 rpg[user] = json.dumps([weapon,hp,lvl,exp])
  339.                 room.message("You're health <f x1200F='1'>is full :)")
  340.             elif hp < 40000 and lvl == 24:
  341.               heal = random.randint(3300,3600)
  342.               hp = hp + heal
  343.               if hp + heal >= 40000:
  344.                 heal = 0
  345.                 hp=40000
  346.                 hpfull = hp = 40000
  347.                 hp , lvl= str(hp),str(lvl)
  348.                 rpg[user] = json.dumps([weapon,hp,lvl,exp])
  349.                 room.message("You're health <f x1200F='1'>is full :)")
  350.             elif hp < 42000 and lvl == 25:
  351.               heal = random.randint(3600,3800)
  352.               hp = hp + heal
  353.               if hp + heal >= 42000:
  354.                 heal = 0
  355.                 hp=42000
  356.                 hpfull = hp = 42000
  357.                 hp , lvl= str(hp),str(lvl)
  358.                 rpg[user] = json.dumps([weapon,hp,lvl,exp])
  359.                 room.message("You're health <f x1200F='1'>is full :)")
  360.             elif hp < 6500 and lvl == 26:
  361.               hp=6500
  362.             elif hp < 6750 and lvl == 27:
  363.               hp=6750
  364.             elif hp < 7000 and lvl == 28:
  365.               hp=7000
  366.             elif hp < 7250 and lvl == 29:
  367.               hp=7250
  368.             elif hp < 7500 and lvl == 30:
  369.               hp=7500
  370.             elif hp < 7750 and lvl == 31:
  371.               hp=7750
  372.             elif hp < 8000 and lvl == 32:
  373.               hp=8000
  374.             elif hp < 8250 and lvl == 33:
  375.               hp=8250
  376.             elif hp < 8500 and lvl == 34:
  377.               hp=8500
  378.             elif hp < 8750 and lvl == 35:
  379.               hp=8750
  380.             elif hp < 9000 and lvl == 36:
  381.               hp=9000
  382.             elif hp < 9250 and lvl == 37:
  383.               hp=9250
  384.             elif hp < 9500 and lvl == 38:
  385.               hp=9500
  386.             elif hp < 9750 and lvl == 39:
  387.               hp=9750
  388.             elif hp < 10000 and lvl == 40:
  389.               hp=10000
  390.             elif hp < 10250 and lvl == 41:
  391.               hp=10250
  392.             elif hp < 10500 and lvl == 42:
  393.               hp=10500
  394.             elif hp < 10750 and lvl == 43:
  395.               hp=10750
  396.             elif hp < 11000 and lvl == 44:
  397.               hp=11000
  398.             elif hp < 11250 and lvl == 45:
  399.               hp=11250
  400.             elif hp < 11500 and lvl == 46:
  401.               hp=11500
  402.             elif hp < 11750 and lvl == 47:
  403.               hp=11750
  404.             elif hp < 12000 and lvl == 48:
  405.               hp=12000
  406.             elif hp < 12250 and lvl == 49:
  407.               hp=12250
  408.             elif hp < 12500 and lvl == 50:
  409.               hp=12500
  410.             elif hp < 12750 and lvl == 51:
  411.               hp=12750
  412.             elif hp < 13000 and lvl == 52:
  413.               hp=13000
  414.             elif hp < 13250 and lvl == 53:
  415.               hp=13250
  416.             elif hp < 13500 and lvl == 54:
  417.               hp=13500
  418.             elif hp < 13750 and lvl == 55:
  419.               hp=13750
  420.             elif hp < 14000 and lvl == 56:
  421.               hp=14000
  422.             elif hp < 14250 and lvl == 57:
  423.               hp=14250
  424.             elif hp < 14500 and lvl == 58:
  425.               hp=14500
  426.             elif hp < 14750 and lvl == 59:
  427.               hp=14750
  428.             elif hp < 15000 and lvl == 60:
  429.               hp=15000
  430.             elif hp < 15250 and lvl == 61:
  431.               hp=15200
  432.             elif hp < 15500 and lvl == 62:
  433.               hp=15500
  434.             elif hp < 15750 and lvl == 63:
  435.               hp=10250
  436.             elif hp < 16700 and lvl == 64:
  437.               hp=16000
  438.             elif hp < 16250 and lvl == 65:
  439.               hp=16250
  440.             elif hp < 16500 and lvl == 66:
  441.               hp=16500
  442.             elif hp < 16750 and lvl == 67:
  443.               hp=16750
  444.             elif hp < 17000 and lvl == 68:
  445.               hp=17000
  446.             elif hp < 17250 and lvl == 69:
  447.               hp=17250
  448.             elif hp < 17500 and lvl == 70:
  449.               hp=17500
  450.             elif hp < 17750 and lvl == 71:
  451.               hp=17750
  452.             elif hp < 18250 and lvl == 72:
  453.               hp=18250
  454.             elif hp < 18500 and lvl == 73:
  455.               hp=18500
  456.             elif hp < 18750 and lvl == 74:
  457.               hp=18750
  458.             elif hp < 19000 and lvl == 75:
  459.               hp=19000
  460.             elif hp < 19250 and lvl == 76:
  461.               hp=19250
  462.             elif hp < 19500 and lvl == 77:
  463.               hp=19500
  464.             elif hp < 19750 and lvl == 78:
  465.               hp=19750
  466.             elif hp < 20000 and lvl == 79:
  467.               hp=20000
  468.             elif hp < 20250 and lvl == 80:
  469.               hp=20250
  470.             elif hp < 20500 and lvl == 81:
  471.               hp=20500
  472.             elif hp < 20750 and lvl == 82:
  473.               hp=20750
  474.             elif hp < 20750 and lvl == 83:
  475.               hp=20750
  476.             elif hp < 21000 and lvl == 84:
  477.               hp=21000
  478.             elif hp < 21250 and lvl == 85:
  479.               hp=21250
  480.             elif hp < 21500 and lvl == 86:
  481.               hp=21500
  482.             elif hp < 21750 and lvl == 87:
  483.               hp=21750
  484.             elif hp < 22000 and lvl == 88:
  485.               hp=22000
  486.             elif hp < 22250 and lvl == 89:
  487.               hp=22250
  488.             elif hp < 22500 and lvl == 90:
  489.               hp=22500
  490.             elif hp < 23000 and lvl == 91:
  491.               hp=23000
  492.             elif hp < 23250 and lvl == 92:
  493.               hp=23250
  494.             elif hp < 23500 and lvl == 93:
  495.               hp=23500
  496.             elif hp < 23750 and lvl == 94:
  497.               hp=23750
  498.             elif hp < 24000 and lvl == 95:
  499.               hp=24000
  500.             elif hp < 24250 and lvl == 96:
  501.               hp=24250
  502.             elif hp < 24500 and lvl == 97:
  503.               hp=24500
  504.             elif hp < 24750 and lvl == 98:
  505.               hp=24750
  506.             elif hp < 25000 and lvl == 99:
  507.               hp=25000
  508.             elif hp <25250 and lvl == 100:
  509.               hp=25250
  510.             hp , lvl= str(hp),str(lvl)
  511.             rpg[user] = json.dumps([weapon,hp,lvl,exp])
  512.             if hpfull: return
  513.             room.message(sntonick(user) + " <f x1233FFFF='1'>has been gived: "+str(heal)+" - <f x12F00='1'>Hp: "+str(hp)+" <f x12334433='1'>LVL: "+str(lvl)+" <f x126666CC='1'>EXP: "+str(exp), True)
  514.            
  515.         ##weapon shop
  516.         elif rpgbool==True and cmd =="weaponshop":
  517.           user=user.name.lower()
  518.           if (user in bosshunt or user in monhunt): return
  519.           if user in rpg:
  520.             weapon , hp , lvl , exp = json.loads(rpg[user])
  521.             weapon=random.choice(weaponlist)
  522.             room.message(sntonick(user) + " <f x12F00='1'>Now Has : " + weapon +" <f x1233FFFF='1'>as a Weapon :).",True)
  523.             rpg[user] = json.dumps([weapon,hp,lvl,exp])
  524.           else:
  525.             hp=250
  526.             weapon=random.choice(weaponlist)
  527.             hp = str(hp)
  528.             lvl=1
  529.             lvl=str(lvl)
  530.             exp=0
  531.             exp=str(exp)
  532.             room.message(sntonick(user) + " <f x12F00='1'>Now Has : " + weapon +" <f x1233FFFF='1'>as a Weapon :).",True)
  533.             rpg[user] = json.dumps([weapon,hp,lvl,exp])
  534.  
  535.         #explore  
  536.         elif rpgbool==True and cmd=="hunt":
  537.           user=user.name.lower()
  538.           if user not in rpg: return
  539.           if user not in monhunt:
  540.             room.message(sntonick(user)+" , <f x12663366='0'>Leaving the town <f x1233FFFF='1'>and searhing for a Battle...<f x12F00='1'>", True)
  541.             delay = random.randint(5,10)
  542.             monster = random.choice(monsterlist)
  543.             if monster in tmonlife:
  544.               monlife = json.loads(tmonlife[monster])
  545.               monsterlife = monlife
  546.               self.setTimeout(delay, room.message, "<f x1233FFFF='1'>Yosh !!, -<f x12F00='1'> Fighting: "+monster+" // <f x12334433='1'>HP : "+str(monsterlife)+" <f x126666CC='1'>Commands : 'atk 'run 'stats 'heal",True)
  547.               monhunt[user] = json.dumps([monster, monsterlife])
  548.             else:
  549.               monsterlife = random.randint(2000,10000)
  550.               self.setTimeout(delay, room.message, "<f x1233FFFF='1'>Yosh !!, -<f x12F00='1'> Fighting: "+monster+" // <f x12334433='1'>HP : "+str(monsterlife)+" <f x126666CC='1'>Commands : 'atk 'run 'stats 'heal",True)
  551.               monhunt[user] = json.dumps([monster, monsterlife])
  552.               tmonlife[monster] = json.dumps(monsterlife)
  553.           if user not in rpg:
  554.             room.message("<f x12F00='1'>Type .weaponshop or .wakeup <f x1233FFFF='1'>for Join to a game :)...")
  555.  
  556.         #boss Hunt
  557.         elif rpgbool==True and cmd=="bosshunt":
  558.           user=user.name.lower()
  559.           if user not in rpg: return
  560.           weapon, hp, lvl, exp = json.loads(rpg[user])
  561.           lvl = int(lvl)
  562.           if lvl < 15:
  563.             room.message("Sorry you're lvl is too slow.. the boss is really hard :|")
  564.             return
  565.           if (user in bosshunt): return
  566.           if bossparty == True:
  567.               room.message(sntonick(user)+" is joinning the Boss Hunting Party", True)
  568.               bosshunt.append(user)
  569.           else:
  570.               room.message(sntonick(user)+" is searching for Powerfull Boss...", True)
  571.               boss = bosslist[0]
  572.               bosslife = random.randint(250000,350000)
  573.               if boss == "Flame Emperor":
  574.                 bosslife = 600000
  575.               self.setTimeout(4, room.message, "BATTLE WITH: "+boss+" // HP : "+str(bosslife)+" Options : 'batk 'stats 'heal")
  576.               bosshunt.append(user)
  577.               bossparty=True
  578.               bossdead=False
  579.  
  580.         #wattack
  581.         elif rpgbool==True and cmd =="atk":
  582.           user=user.name.lower()
  583.           if user not in rpg:return
  584.           if user in monhunt:
  585.             monster, monsterlife = json.loads(monhunt[user])
  586.             weapon , hp ,lvl , exp= json.loads(rpg[user])
  587.             hp, lvl=int(hp), int(lvl)
  588.             if lvl == 1: randdamage=random.randint(2000,5000)
  589.             elif lvl == 2: randdamage=random.randint(500,750)
  590.             elif lvl == 3: randdamage=random.randint(500,750)
  591.             elif lvl == 4: randdamage=random.randint(500,750)
  592.             elif lvl == 5: randdamage=random.randint(500,750)
  593.             elif lvl == 6: randdamage=random.randint(500,750)
  594.             elif lvl == 7: randdamage=random.randint(500,750)
  595.             elif lvl == 8: randdamage=random.randint(500,750)
  596.             elif lvl == 9: randdamage=random.randint(500,750)
  597.             elif lvl == 10: randdamage=random.randint(500,750)
  598.             elif lvl == 11: randdamage=random.randint(500,750)
  599.             elif lvl == 12: randdamage=random.randint(500,750)
  600.             elif lvl == 13: randdamage=random.randint(500,750)
  601.             elif lvl == 14: randdamage=random.randint(500,750)
  602.             elif lvl == 15: randdamage=random.randint(500,750)
  603.             elif lvl == 16: randdamage=random.randint(500,750)
  604.             elif lvl == 17: randdamage=random.randint(500,750)
  605.             elif lvl == 18: randdamage=random.randint(500,750)
  606.             elif lvl == 19: randdamage=random.randint(500,750)
  607.             elif lvl == 20: randdamage=random.randint(500,750)
  608.             randdamage = int(randdamage)
  609.             monsterlife = int(monsterlife)
  610.             monsterlife = monsterlife - randdamage
  611.             mondamage = random.randint(200,750)
  612.             mondamage = int(mondamage)
  613.             hp= hp - mondamage
  614.             room.message(sntonick(user)+" <f x1233FFFF='1'>Attack: "+monster+" - <f x12F00='1'>With : "+weapon+" <f x126666CC='1'>Damage: "+str(randdamage)+" - <f x1233FFFF='1'>HP Monster : "+str(monsterlife)+" // "+monster+" <f x12F00='1'>Attack: "+sntonick(user)+" <f x1233FFFF='1'>Damage: "+str(mondamage)+" - <f x12334433='1'>HP "+sntonick(user)+": "+str(hp),True)
  615.             hp = str(hp)
  616.             lvl = str(lvl)
  617.             monsterlife = str(monsterlife)
  618.             monhunt[user] = json.dumps([monster, monsterlife])
  619.             rpg[user] = json.dumps([weapon,hp,lvl,exp])
  620.             hp=int(hp)
  621.             monsterlife = int(monsterlife)
  622.             #if monsterlife < 3000
  623.             #  randexp=random.randint(250,400)
  624.             if monsterlife <=0 and hp > 0:
  625.               if monster in tmonlife:
  626.                 monlife = json.loads(tmonlife[monster])
  627.                 if monlife < 3000:
  628.                   randexp=random.randint(250,400)
  629.                 elif monlife >= 3000 and not monlife > 5000:
  630.                   randexp=random.randint(400,600)
  631.                 elif monlife >= 5000 and not monlife > 7600:
  632.                   randexp=random.randint(600,700)
  633.                 elif monlife >= 7600:
  634.                   randexp=random.randint(900,950)
  635.               exp=int(exp)
  636.               exp=exp + randexp
  637.               room.message(monster+" ,<f x1233FFFF='1'>has been defeated, @"+sntonick(user)+",<f x12F00='1'> get Exp :"+str(randexp)+" <f x12334433='1'>Total Exp: "+str(exp),True)
  638.               if hp<30:
  639.                 hp=60
  640.               hp = str(hp)
  641.               lvl=str(lvl)
  642.               exp=str(exp)
  643.               rpg[user] = json.dumps([weapon,hp,lvl,exp])
  644.               del monhunt[user]
  645.             hp = int(hp)
  646.             if hp <=0:
  647.               room.message("@"+sntonick(user)+" <f x12F00='1'>Defeat <f x1233FFFF='1'>From game - <f x12334433='1'>Game.Over x_x",True)
  648.               if hp<30:
  649.                 hp=60
  650.               hp = str(hp)
  651.               lvl=str(lvl)
  652.               exp=str(exp)
  653.               rpg[user] = json.dumps([weapon,hp,lvl,exp])
  654.               del monhunt[user]
  655.  
  656.         if rpgbool==True and cmd == "lvl":
  657.           xp = 0
  658.           xp = int(xp)
  659.           l=0
  660.           l=int(l)
  661.           user = user.name.lower()
  662.           loadeng = "<f x1233FFFF='1'>Sav<f x12F00='1'>ar . . . . ."
  663.           if user in rpg:
  664.             weapon,hp,lvl,exp=json.loads(rpg[user])
  665.             lvl, exp = int(lvl), int(exp)
  666.             if lvl == 1: exp == 2000
  667.             if lvl == 2: exp == 2500
  668.             if lvl == 3: exp == 3000
  669.             if lvl == 4: exp == 5000
  670.             if lvl == 5: exp == 7500
  671.             if lvl == 6: exp == 9000
  672.             if lvl == 7: exp == 10000
  673.             if lvl == 8: exp == 12000
  674.             if lvl == 9: exp == 14000
  675.             if lvl == 10: exp == 17000
  676.             if lvl == 11: exp == 20000
  677.             if lvl == 12: exp == 25000
  678.             if lvl == 13: exp == 28000
  679.             if lvl == 14: exp == 30000
  680.             if lvl == 15: exp == 33000
  681.             if lvl == 16: exp == 35000
  682.             if lvl == 17: exp == 37000
  683.             if lvl == 18: exp == 39000
  684.             if lvl == 19: exp == 44000
  685.             if lvl == 20: exp == 47000
  686.             if exp >= xp:
  687.               lvl = int(lvl)
  688.               lvl = lvl + 1
  689.               exp = xp - exp
  690.               exp = str(exp)
  691.               rpg[user] = json.dumps([weapon,hp,lvl,exp])
  692.               room.message(loadeng, True)
  693.               self.setTimeout(int(3), room.message, sntonick(user)+",<f x12F00='1'> lvl up. <f x1233FFFF='1'>now you're lvl <f x12334433='1'>"+str(lvl),True)
  694.             else:
  695.               room.message("Your lvl is "+str(lvl)+". You need to reach "+str(xp)+" To lvl up.")      
  696.    
  697.         if cmd == "list":
  698.           if args:
  699.             if args == "bossparty":
  700.               room.message("<f x1200F='1'>Here are player list in <f x12F00='1'>Boss Hunt Party:<f x12334433='1'> %s" % list(bosshunt), True)
  701.             #if args == "monparty":
  702.             #  room.message("Here are player list in Monster Hunt Party: %s" % list(monpartyhunt), True)
  703.           else:
  704.             return
  705.  
  706.         #endbattle
  707.         if rpgbool==True and cmd=="run":
  708.           user = user.name.lower()
  709.           if user not in rpg: return
  710.           if (user in bosshunt or user in monhunt):
  711.             if user in bosshunt:
  712.               bosshunt.remove(user)
  713.               room.message(sntonick(user)+"<f x12F00='1'> ran from <f x1233FFFF='1'>battle",True)
  714.             if user in monhunt:
  715.               del monhunt[user]
  716.               room.message(sntonick(user)+"<f x12F00='1'> ran from <f x1233FFFF='1'>battle",True)
  717.            
  718.         ##stats
  719.         elif rpgbool==True and cmd =="stats":
  720.             user=user.name.lower()
  721.             if user in rpg:
  722.               weapon , hp , lvl , exp = json.loads(rpg[user])
  723.               room.message(sntonick(user) + "<f x1200F='1'> Weapon : " + weapon +"<f x12F00='1'>  Hp: "+str(hp)+"<f x12334433='1'> Lvl : "+str(lvl)+"<f x1233FFFF='1'> Exp : "+str(exp),True)
  724.             else:
  725.               room.message(sntonick(user)+" <f x1200F='1'>You're not listed || <f x12F00='1'>Type .wakeup or .weaponshop <f x12334433='1'>for Join <f x1233FFFF='1'>to RPG GAME!! :)",True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement