Skip to content
General IRCX

Somebody Help Me Please?

A TG007 community discussion started by wizard1970.

Discussion 15 posts
Page 1 of 1
Open
Topic #10429 · 15 published posts · 5,096 views

I have this code that took the tats and want to switch to st5, I know it is possible and I tried but it dosen't work.

can you halp me please?

 

;########################################################

;# JO-KEN-PO Settings. #

;########################################################

alias jkp.preparing {

var %hand = $rand(1,99)

var %s = $rand(1,100)

if (%hand > 0 && %hand <= 70) { thset jkpbet $rand(50,1000) }

else { thset jkpbet $rand(50,1000) }

thset jkptotal 0

if (%mao > 0 && %mao <= 33) { thset jkp.win rock | thset jkp.lose paper | thset myplay scissors }

elseif (%hand > 33 && %han <= 66) { thset jkp.win paper | thset jkp.lose scissors | thset myplay rock }

else { thset jkp.win scissors | thset jkp.lose rock | thset myplay paper }

mstat *s4 $stm Special game - Jo-Ken-Po - maximum bet: $thget(jkpbet) !
choose between rock , Paper or scissors. • Paper beat Rock, rocks beat scissors, and scissors beats Paper.
Use scissors, paper or rocks + points - Ex. rocks 50; scissors 25; paper 30

}

alias processjkp {

if ($th2(jkp) == $null) {

if ($2) {

if ($2 isnum) {

if ($2 > 0 && $2 <= $thget(jkpbet)) {

if ($2 <= $user.score($nick)) {

thset jkptotal $calc($thget(jkptotal) + 1)

thset JTemp.jkp. $+ $thget(jkptotal) $nick

if ($1 isin $thget(jkp.win)) {

thuset2 jkp win

thuset2 jbet $2

}

elseif ($1 isin $thget(jkp.lose)) {

thuset2 jkp lose

thuset2 jbet $calc((-1) * $2)

}

else {

thuset2 jkp tie

thuset2 jbet 0

}

mstat *s4 $stm • $nick • you play well - you choose $1 and bet $2 points! Now you have to wait (Y)

}

else { .msg $chan $nick , sorry, but you can not bet more that you have! }

}

else { .msg $chan $nick You have to bet 1 and $thget(jkpbet) $+ ! }

}

else { .msg $chan the bet has to be a number, $nick ! }

}

else { .msg $chan You should bet a value, $nick ! Ex. rocks 35 }

}

else { .msg $chan Hey, $nick , you already betting;) }

}

alias jkpscore {

mstat *s4 $stm (O) Betting closed! I chose • $thget(myplay) • (yn)
(I) Congrats to who won! - nice try for those who made a tie! - And who lost,next time is better (i)

%ij = 1

.timer.jkp. $+ $cid -m 0 500 jkpinc jkp. $+ $cid

}

alias jkpinc {

if ($thget($eval(JTemp.jkp. $+ %ij,1)) == $null) {

.timer. $+ $1 off

unset %ij

hdel -w Trivia $+ $idenn JTemp.*

}

else {

thset jtemp.cng $thget($eval(JTemp.jbet. $+ $thget($eval(JTemp.jkp. $+ %ij,1)),1))

setvar $thget($eval(JTemp.jkp. $+ %ij,1)) Score $calc($realvar($thget($eval(JTemp.jkp. $+ %ij,1)), Score) + $thget(jtemp.cng))

thset $eval(Score. $+ $thget($eval(JTemp.jkp. $+ %ij,1)),1) $calc($thget($eval(Score. $+ $thget($eval(JTemp.jkp. $+ %ij,1)),1)) + $thget(temp.cng))

if ($thget($eval(JTemp.jbet. $+ $thget($eval(JTemp.jkp. $+ %ij,1)),1)) == 0) {

mstat *s4 $stm $thget($eval(JTemp.jkp. $+ %ij,1)) : (*) $thget($eval(JTemp.jkp. $+ %ij,1)) (*) empatou, ou seja, nÃão ganhou mas tambÃém nÃão perdeu! ;)

}

else {

mstat *s4 $stm $thget($eval(JTemp.jkp. $+ %ij,1)) : (*) $thget($eval(JTemp.jkp. $+ %ij,1)) (*) $iif($thget($eval(JTemp.jbet. $+ $thget($eval(JTemp.jkp. $+ %ij,1)),1)) > 0,ganhou $thget($eval(JTemp.jbet. $+ $thget($eval(JTemp.jkp. $+ %ij,1)),1)), perdeu $calc($thget($eval(JTemp.jbet. $+ $thget($eval(JTemp.jkp. $+ %ij,1)),1)) * -1)) ponto $+ $iif($thget($eval(JTemp.jbet. $+ $thget($eval(JTemp.jkp. $+ %ij,1)),1)) != 1,s) $+ ! Total de pontos: $user.score($thget($eval(JTemp.jkp. $+ %ij,1)))

}

inc %ij

}

}

 

 

 

 

and i put this in section " handling normal input " in st5.0

on *:TEXT:*:#:{

if (rock isin $1 || scissors isin $1 || paper isin $1) {

processjkp $1-

}

}

 

 

 

 

any help is welcome,please

thanks

i took just a quick look and i copied the game to a file on my desktop to have a better look when i get some time.i am assuming that this code is supposed to add or subtract trivia points.if that is the case you need to add stx_addpoints in places that its gonna add points for example


stx_addpoints $nick 50 OR in sutraction cases stx_addpoints $nick -50[/code]

 

as for the last part that you are putting in your trivia file you probably dont need it.once you get the stx_addpoints part in that game file where you need it then you should be good to go.

i took just a quick look and i copied the game to a file on my desktop to have a better look when i get some time.i am assuming that this code is supposed to add or subtract trivia points.if that is the case you need to add stx_addpoints in places that its gonna add points for example


stx_addpoints $nick 50 OR in sutraction cases stx_addpoints $nick -50[/code]

as for the last part that you are putting in your trivia file you probably dont need it.once you get the stx_addpoints part in that game file where you need it then you should be good to go.

thanks but is another problem, when i start the game this part appears " Special game - Jo-Ken-Po - maximum bet: $thget(jkpbet) !
choose between rock , Paper or scissors. • Paper beat Rock, rocks beat scissors, and scissors beats Paper.
Use scissors, paper or rocks + points - Ex. rocks 50; scissors 25; paper 30 "

but doesn't work anymore more, and I wait and I wait and does not reach the end of the game I do !paper and nothing, maybe the timers of the game are wrong....i don't know. don't appears this

" Betting closed! I chose • $thget(myplay) • (yn)
(I) Congrats to who won! - nice try for those who made a tie! - And who lost,next time is better (i) "

Edited Jul 12, 2008 9:42 PM by wizard1970

the NASCAR race was run tonight so i am gonna work on this for you on sunday.it may take me most the day but i will try for you.if you get it working let me know thru this post as i am trying to make a connection script and you need help so that can go on the back burner for a day or two.

mstat is an alias. I took a look at your code, and you donot have an alias for mstat. So, I'm guessing that is why it isn't working.

mstat is an alias. I took a look at your code, and you donot have an alias for mstat. So, I'm guessing that is why it isn't working.

yes, i change that but still not working, maybe the timers

i put like this " msg # S Tahoma;0 Special game - Jo-Ken-Po - maximum bet: $thget(jkpbet) !
choose between rock , Paper or scissors. • Paper beat ", when the game appears, i do paper 50 and nothing happens, it seems that is stuck

 

it's hard to test hte code when you do not include all of it. IE aliases.

Get information about ircWx here

err0r is right. The only way we'll be able to help you is if you give us the entire script so we can figure out what is going on. Can you give us what you have, and we'll try to help.

ok,forget that game is very complicated , i have this and i put in st5 an when i do paper 50 nothing happens

 

 

;_______________________________________________________________________________

_____

;::::::::::::::::::: Jo-Ken-Po

;¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

¯¯¯¯¯

alias -l st_jo_ken_pon {

if ($timer(jkp7)) return

unset %jkp.*

%jkp.max = 3

set %jkp.jkpal $r(1,3)

if (%jkp.jkpal == 1) { set %jkp.myplay scissors | set %jkp.lose paper | set %jkp.win rock }

if (%jkp.jkpal == 2) { set %jkp.myplay rock | set %jkp.lose scissors | set %jkp.win Paper }

if (%jkp.jkpal == 3) { set %jkp.myplay paper | set %jkp.lose rock | set %jkp.win scissors }

var %i = 1

while (%i <= %jkp.max) { %jkp.vrij = $addtok(%jkp.vrij,%i,32) | inc %i }

.enable #jkpinput

.timerjkp1 1 1 mstat *s1 
 ►► Jo Ken Po $&


 rock, paper ou scissors

.timerjkp2 1 3 mstat *s1 
 Win or Lose Points $&


 Use! <element> to play!!

.timerjkp3 1 13 mstat *s1 you have 20 seconds to play

.timerjkp4 1 23 mstat *s1 you have 10 seconds to play

.timerjkp5 1 28 mstat *s1 you have 15 seconds to play

.timerjkp7 1 33 jkpstop

}

#jkpinput off

on *:text:! *:#:{

if (%jkp. [ $+ [ $nick ] ]) mtime $nick you have chose %jkp. [ $+ [ $nick ] ] before !

else {

if (!$istok(%jkp.vrij,$2,32)) mtime $nick has been chose $2 .

else {

%jkp.vrij = $remtok(%jkp.vrij,$2,32)

%jkp. [ $+ [ $nick ] ] = $2

mtime $nick you chose $2 !

if ($2 == %jkp.myplay) %jkp.tie = $nick

if ($2 == %jkp.lose) %jkp.lose = $nick

if ($2 == %jkp.win) %jkp.win = $nick

}

}

else mtime $nick $nick You have to choose.

}

#jkpinput end

 

alias jkpstop {

.disable #jkpinput

mstat *s1 end of Jo Ken Po▓▒ 
 %jkp.myplay ► tie %jkp.lose ► -50 points %jkp.win ► 100 Points

.timerst_next 1 $sts(delay_wrong) st question

if (%jkp.win) {

stx_addpoints %jkp.win 100

mtime %jkp.ganha $stm %jkp.win You get 100 points in Jo Ken Po

}

if (%jkp.lose) {

stx_addpoints %jkp.lose -50

mtime %jkp.perde $stm %jkp.loose you looses 50 points in Jo Ken Po

}

if (%jkp.tie) {

stx_addpoints %jkp.tie 0

mtime %jkp.tie $stm %jkp.tie its a tie with Jo Ken Po

}

unset %jkp.*

}

I'll give you forewarning, modding into Supertrivia is going to be very time intensive (in relations to mIRC) and probably rather difficult.

the code above is working, the only thing is when i do paper 50 ou rock 10 nothing happens, i think that something is missing in command to choose that I want to play

Edited Jul 22, 2008 8:59 PM by wizard1970

someone knows how to put the command in this game? the command is !paper !rock or scissors, i think that is here on *:text:! *:#:{

but how?

;_______________________________________________________________________________

_____

;::::::::::::::::::: Jo-Ken-Po

;¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

¯¯¯¯¯

alias -l st_jo_ken_pon {

if ($timer(jkp7)) return

unset %jkp.*

%jkp.max = 3

set %jkp.jkpal $r(1,3)

if (%jkp.jkpal == 1) { set %jkp.myplay scissors | set %jkp.lose paper | set %jkp.win rock }

if (%jkp.jkpal == 2) { set %jkp.myplay rock | set %jkp.lose scissors | set %jkp.win Paper }

if (%jkp.jkpal == 3) { set %jkp.myplay paper | set %jkp.lose rock | set %jkp.win scissors }

var %i = 1

while (%i <= %jkp.max) { %jkp.vrij = $addtok(%jkp.vrij,%i,32) | inc %i }

.enable #jkpinput

.timerjkp1 1 1 mstat *s1 
 ►► Jo Ken Po $&


 rock, paper ou scissors

.timerjkp2 1 3 mstat *s1 
 Win or Lose Points $&


 Use! <element> to play!!

.timerjkp3 1 13 mstat *s1 you have 20 seconds to play

.timerjkp4 1 23 mstat *s1 you have 10 seconds to play

.timerjkp5 1 28 mstat *s1 you have 15 seconds to play

.timerjkp7 1 33 jkpstop

}

#jkpinput off

on *:text:! *:#:{

if (%jkp. [ $+ [ $nick ] ]) mtime $nick you have chose %jkp. [ $+ [ $nick ] ] before !

else {

if (!$istok(%jkp.vrij,$2,32)) mtime $nick has been chose $2 .

else {

%jkp.vrij = $remtok(%jkp.vrij,$2,32)

%jkp. [ $+ [ $nick ] ] = $2

mtime $nick you chose $2 !

if ($2 == %jkp.myplay) %jkp.tie = $nick

if ($2 == %jkp.lose) %jkp.lose = $nick

if ($2 == %jkp.win) %jkp.win = $nick

}

}

else mtime $nick $nick You have to choose.

}

#jkpinput end

 

alias jkpstop {

.disable #jkpinput

mstat *s1 end of Jo Ken Po▓▒ 
 %jkp.myplay ► tie %jkp.lose ► -50 points %jkp.win ► 100 Points

.timerst_next 1 $sts(delay_wrong) st question

if (%jkp.win) {

stx_addpoints %jkp.win 100

mtime %jkp.win $stm %jkp.win You get 100 points in Jo Ken Po

}

if (%jkp.lose) {

stx_addpoints %jkp.lose -50

mtime %jkp.perde $stm %jkp.loose you looses 50 points in Jo Ken Po

}

if (%jkp.tie) {

stx_addpoints %jkp.tie 0

mtime %jkp.tie $stm %jkp.tie its a tie with Jo Ken Po

}

unset %jkp.*

}

on *:text:! *:#:{

 

See the space between the ! & *? That will only respond to:

 

! paper

! rock

! scissors

 

 

well maybe is something else, i tray but doesn't work

no one can find the error?

I do ! paper or !paper and answer is "already chosen"

 

please

thanks