RPG dialog v1.0

By pwnisher3 on Dec 15, 2008

ok i'm getting it done now. it is coming along pretty good. having some minor trouble and hope to fix it soon. if you can please post it :)

alias rpg { dialog -m rpg rpg }
menu status,channel {
  RPG:/rpg
}
dialog RPG {
  title "Role Playing Game"
  size -1 -1 113 91
  option dbu
  box "", 1, 1 -2 112 33
  text "Enemy :", 2, 3 3 25 8, center
  edit "", 3, 27 2 84 10, read
  text "Enemy HP :", 4, 3 19 30 8, center
  edit "", 5, 31 18 80 10, read
  box "", 6, 1 41 112 50
  edit "", 7, 39 32 73 10, read
  text "Battle Status :", 8, 3 33 36 8, center
  text "Fighter :", 9, 3 46 25 8, center
  edit "level : ", 10, 26 45 85 10, read
  text "Your HP :", 11, 3 63 25 8, center
  edit "", 12, 28 62 83 10, read
  button "Attack", 13, 2 77 33 12, flat
  button "Defend", 14, 35 77 37 12, flat
  button "Magic", 15, 72 77 39 12, flat
  menu "Buy", 16
  item "HP Potion", 17, 16
  item "ATK Potion", 18, 16
  item "DEF Potion", 19, 16
}
on *:dialog:rpg:menu:17:{
  inc -ra %hp 25
}  
on *:dialog:rpg:menu:18:{
  inc -ra %atk 25
}  
on *:dialog:rpg:menu:19:{
  dec -ra %eatk 25
}  
on *:dialog:rpg:init:*:{
  set %level 1
  did -ra rpg 10 %level
  set %HP 200
  set %enemy $rand(1,3) 
  if (%enemy == 1) .set %Enemy2 %Goblin   
  if (%enemy == 2) .set %Enemy2 %Thief 
  if (%enemy == 3) .set %Enemy2 %Ogre 
  if (%enemy2 == %goblin) did -ra rpg 3 Goblin
  if (%enemy2 == %thief) did -ra rpg 3 Thief
  if (%enemy2 == %ogre) did -ra rpg 3 Ogre
  if (%enemy2 == %goblin) set %ehp 219
  if (%enemy2 == %thief) set %ehp 196
  if (%enemy2 == %ogre) set %ehp 241
  did -ra rpg 5 %EHP
  did -ra rpg 12 %hp
} 
on *:dialog:rpg:sclick:13:{
  set %atk $gettok(62 29 47,$r(1,3),32)
  did -ra rpg 5 %ehp | dec %ehp %atk
  set %eatk $gettok(48 34 51,$r(1,3),32)
  did -ra rpg 12 %hp | dec %hp %eatk
}  
on *:dialog:rpg:*:*:{
  did -ra rpg 5 %EHP
  did -ra rpg 12 %hp
  if (%ehp >= 0) && (%hp <= 0) did -ra rpg 7 You Lost!
  if (%ehp <= 0) && (%hp >= 0) did -ra rpg 7 You Won! 
  else did -ra rpg 7 Battle In Progress
} 

Comments

Sign in to comment.
Priest   -  Jan 09, 2010

Looks interesting, I'm working on a form of it that does everything via bot, Just got to get rid of all the uglyness within the p2p's. >.>

 Respond  
DarkCoder   -  Dec 26, 2009

tbh, this is a good script. il finish it for you :).

 Respond  
pwnisher3   -  Dec 16, 2008

HP = Hit Points

 Respond  
Jonesy44   -  Dec 16, 2008

HP? what is that horse power? o.O

 Respond  
pwnisher3   -  Dec 16, 2008

i'm having truoble with the next update. i can't get it to go up a level when i win the battles. i need it to disable the buttons when the timers are activated. and you can prolly figure the rest out. it is full of bugs

alias rpg { dialog -m rpg rpg }
menu status,channel {
  RPG:/rpg
}
dialog RPG {
  title "Role Playing Game"
  size -1 -1 113 91
  option dbu
  box "", 1, 1 -2 112 33
  text "Enemy :", 2, 3 3 25 8, center
  edit "", 3, 27 2 84 10, read
  text "Enemy HP :", 4, 3 19 30 8, center
  edit "", 5, 31 18 80 10, read
  box "", 6, 1 41 112 50
  edit "Start!", 7, 39 32 73 10, read
  text "Battle Status :", 8, 3 33 36 8, center
  text "Fighter :", 9, 3 46 25 8, center
  edit "level : ", 10, 26 45 85 10, read
  text "Your HP :", 11, 3 63 25 8, center
  edit "", 12, 28 62 83 10, read
  button "Attack", 13, 2 77 33 12, flat
  button "Defend", 14, 35 77 37 12, flat
  button "Magic", 15, 72 77 39 12, flat
  menu "Buy", 16
  item "HP Potion", 17, 16
  item "ATK Potion", 18, 16
  item "DEF Potion", 19, 16
}
on *:dialog:rpg:menu:17:{
  inc -ra %hp 25
}  
on *:dialog:rpg:menu:18:{
  inc -ra %atk 25
}  
on *:dialog:rpg:menu:19:{
  dec -ra %eatk 25
}  
on *:dialog:rpg:init:*:{
  did -a rpg 10 %level
  set %HP 200
  set %enemy $rand(1,3) 
  if (%enemy == 1) .set %Enemy2 %Goblin   
  if (%enemy == 2) .set %Enemy2 %Thief 
  if (%enemy == 3) .set %Enemy2 %Ogre 
  if (%enemy2 == %goblin) did -ra rpg 3 Goblin
  if (%enemy2 == %thief) did -ra rpg 3 Thief
  if (%enemy2 == %ogre) did -ra rpg 3 Ogre
  if (%enemy2 == %goblin) set %ehp 219
  if (%enemy2 == %thief) set %ehp 196
  if (%enemy2 == %ogre) set %ehp 241
  did -ra rpg 5 %EHP
  did -ra rpg 12 %hp
} 
on *:dialog:rpg:sclick:13:{

  .timer 1 1 set %atk $gettok(62 29 47,$r(1,3),32)
  .timer 2 1 did -ra rpg 7 you did %atk damage 
  did -ra rpg 5 %ehp | dec %ehp %atk
  .timer 1 2 set %eatk $gettok(48 34 51,$r(1,3),32)
  .timer 2 2 did -ra rpg 7 the enemy did %eatk damage
  did -ra rpg 12 %hp | dec %hp %eatk
  .timer 2 5 did -ra rpg 7 Your Turn!
}  
on *:dialog:rpg:*:*:{
  did -ra rpg 5 %EHP
  did -ra rpg 12 %hp
  if (%wins == 1) inc %level 1
  if (%ehp <= 0) && (%hp <= 0) did -ra rpg 7 Draw!
  if (%ehp <= 0) && (%hp >= 0) inc %wins 1
  if (%ehp >= 0) && (%hp <= 0) did -ra rpg 7 You Lost!
  if (%ehp <= 0) && (%hp >= 0) did -ra rpg 7 You Won! 
} 
 Respond  
pwnisher3   -  Dec 16, 2008

well aren't we just a little token using criticizer -_- lol i will fix it sometime MD but for now it is pretty much beta

 Respond  
guest598594   -  Dec 15, 2008
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.