mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2014
Posts: 42
K
Kooky Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Oct 2014
Posts: 42
I'm not sure what I've done wrong exactly, but it's not working. Any and all help would be most welcome to fix this.

on *:text:!Register *:#LATOOC:{
/notice $nick Registration has started.. Step One: Type !Name (Name of your character)
}


Joined: Jun 2014
Posts: 248
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Jun 2014
Posts: 248
Originally Posted By: Kooky
I'm not sure what I've done wrong exactly, but it's not working. Any and all help would be most welcome to fix this.

on *:text:!Register*:#LATOOC: {
notice $nick Registration has started.. Step One: Type !Name (Name of your character)
}


Last edited by Belhifet; 19/10/14 03:37 AM.
Joined: Oct 2014
Posts: 42
K
Kooky Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Oct 2014
Posts: 42
Thank you SOOOOoooo much! It seems my spacing and characters of the script were slightly off. Thanks a ton!

Maybe you can help me figure out another issue on the same topic?

Trying to get !Name TheCharacterName to work, but only !Name does and so far it's not writing the file for the character.

on *:text:!Register*:#LATOOC: {
notice $nick Registration has started.. Step One: Type !Name (Name of your character)
}
on *:text:*!Name $2- *:#LATOOC: {
if ($readini($nick $+ .ini,Register,Name) == on) { /notice $nick You already made a name! | halt }
writeini $nick $+ .ini $nick Name $2-
writeini $nick $+ .ini Register Name on
notice $nick Your character name is registered. Step 2: $2- $+ , What is your character type? Type !Types to get a list of what you can be, or to jump right to creation, type !Pick Type (Your selection goes here)
}

Also working on one for listing item numbers found in said file..

on *:text:!MyItems*:#LATOOC: {
if ($readini($nick $+ .ini,Register,Complete) != on) { /notice $nick Please Register! !Register | halt }
if ($readini($nick $+ .ini,pass,passaccept) != on) { /notice $nick Login! | halt }
/set %Cookie $readini($nick $+ .ini,$nick,Cookie)
/set %Tickets $readini($nick $+ .ini,$nick,Tickets)
}

Joined: Jun 2014
Posts: 248
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Jun 2014
Posts: 248
Code:
on *:text:!Name *:#LATOOC: { 
if ($readini($nick $+ .ini,Register,Name) == on) { notice $nick You already made a name! | halt }
writeini $nick $+ .ini $nick Name $2-
writeini $nick $+ .ini Register Name on
notice $nick Your character name is registered. Step 2: $2- $+ , What is your character type? Type !Types to get a list of what you can be, or to jump right to creation, type !Pick Type (Your selection goes here)
}

on *:text:!MyItems*:#LATOOC: { 
if ($readini($nick $+ .ini,Register,Complete) != on) { notice $nick Please Register! !Register | halt }
if ($readini($nick $+ .ini,pass,passaccept) != on) { notice $nick Login! | halt }
set %Cookie $readini($nick $+ .ini,$nick,Cookie)
set %Tickets $readini($nick $+ .ini,$nick,Tickets)
}



I'm not exactly sure what the 2nd one does.

Last edited by Belhifet; 19/10/14 06:54 AM.
Joined: Oct 2014
Posts: 42
K
Kooky Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Oct 2014
Posts: 42
This one?
on *:text:!MyItems*:#LATOOC: {
if ($readini($nick $+ .ini,Register,Complete) != on) { notice $nick Please Register! !Register | halt }
if ($readini($nick $+ .ini,pass,passaccept) != on) { notice $nick Login! | halt }
set %Cookie $readini($nick $+ .ini,$nick,Cookie)
set %Tickets $readini($nick $+ .ini,$nick,Tickets)
}

Once a character is made with other commands, it's supposed to be used to read the items and number of said item that the character has.

So
<Me> !MyItems
<Bot> Me's Items: Cookie: 2 | Tickets: 1


But I haven't gotten that far yet in the display of it.. I'm having a hard time getting my whole thing to work properly to even reach as far as the !MyItems command.

Joined: Oct 2014
Posts: 42
K
Kooky Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Oct 2014
Posts: 42
After the !Name CharacterName I have...

on 1:TEXT:!Pick Type*:#LATOOC: {
if ($readini($nick $+ .ini,Register,Name) != on) { /notice $nick Please choose a name !Name (Name) | halt }
if ($readini($nick $+ .ini,Register,Type) == on) { /notice $nick You have already chosen a Type! | halt }
if ($3 == Prisoner) {
writeini $nick $+ .ini Register Type on
writeini $nick $+ .ini $nick Type Prisoner
writeini $nick $+ .ini $nick Health 10
writeini $nick $+ .ini $nick Tickets 0
notice $nick Final Step: Pick your password! Type !Pass (Password) You will need this for logging in and keeping track of your character.
}


But it's not letting me.. Keeps saying:
<Me> !Pick Type Guard
-Bot- Please choose a name !Name (Name)



It's a long work in progress. But as I get help with small snippets, I can go in and modify the other parts as I learn to understand them all better.

Joined: Jun 2014
Posts: 248
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Jun 2014
Posts: 248
if ($readini($nick $+ .ini,Register,Name) != on) { /notice $nick Please choose a name !Name (Name) | halt }

should be

if ($readini($($+($nick,.ini),2),Register,Name) != on) { /notice $nick Please choose a name !Name (Name) | halt }

Joined: Oct 2014
Posts: 42
K
Kooky Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Oct 2014
Posts: 42
I adjusted it

on *:text:!Name *:#LATOOC: {
if ($readini($($+($nick,.ini),2),Register,Name) != on) { /notice $nick Please choose a name !Name (Name) | halt }
writeini $nick $+ .ini $nick Name $2-
writeini $nick $+ .ini Register Name on
notice $nick Your character name is registered. Step 2: $2- $+ , What is your character type? Type !Types to get a list of what you can be, or to jump right to creation, type !Pick Type (Your selection goes here)
}


And now I get

<Me> !Name BloodyMe
-Bot- Please choose a name !Name (Name)

And no ini file is being written to create the character sheet. I think I messed up on this one as well.. At least so far it's been right characters and variables in the wrong places.

Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Try to use this code, NOT TESTED if you want more help about it please give as an .ini file here to understand 100% what is for.

Code:
ON *!:TEXT:!*:#LATOOC: {
  var %f = $nick $+ .ini
  if ($1 == !register) {
    .notice $nick Registration has started.. Step One: Type !Name (Name of your character)
  }
  if ($1 == !myitems) {
    if ($readini(%f,Register,Complete) != on) { .notice $nick Please Register! !Register | return }
    if ($readini(%f,pass,passaccept) != on) { .notice $nick Login! | return }
    set %Cookie $readini(%f,n,$nick,Cookie)
    set %Tickets $readini(%n,n,$nick,Tickets)
  }
  if ($1 == !pick) {
    if (!$2) { .msg $chan [ $+ $nick $+ ]: Error, Not enough parameters, try again and enter the type and text! | return }
    if ($2 !== type) { .msg $chan [ $+ $nick $+ ]: Error, Incorrect parameter, try again and use $1 type <text> ! | return }
    if ($readini(%f,n,Register,Name) !== on) { .notice $nick Please choose a name !Name (Name) | halt }
    if ($readini(%f,n,Register,Type) == on) { .notice $nick You have already chosen a Type! | halt }
    if ($3 !== Prisoner) && ($3 !== Guard) { .msg $chan [ $+ $nick $+ ]: Error, Incorrect paramater, try again and enter the correct type! (Prisoner or Guard). | return }
    if ($3 == Prisoner) {
      writeini -n $qt(%f) Register Type on
      writeini -n $qt(%f) $nick Type Prisoner
      writeini -n $qt(%f) $nick Health 10
      writeini -n $qt(%f) $nick Tickets 0
    }
    if ($3 == Guard) {
      writeini -n $qt(%f) Register Type on
      writeini -n $qt(%f) $nick Type Guard
      writeini -n $qt(%f) $nick Health 20
      writeini -n $qt(%f) $nick Tickets 0
    }
    .notice $nick Final Step: Pick your password! Type !Pass (Password) You will need this for logging in and keeping track of your character.
  }
  if ($1 == !name) {
    if (!$2) { .msg $chan [ $+ $nick $+ ]: Error, Not enough parameters, try again and enter the nickname! | return }
    if ($readini(%f,n,Register,Name) == on) { .msg $chan [ $+ $nick $+ ]: You are already registered. | return }
    writeini -n $qt(%f) $nick Name $2-
    writeini -n $qt(%f) Register Name on
    .notice $nick Your character name is registered. Step 2: $2- $+ , What is your character type? Type !Types to get a list of what you can be, or to jump right to creation, type !Pick Type (Your selection goes here)
  }
}


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Oct 2014
Posts: 42
K
Kooky Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Oct 2014
Posts: 42
Originally Posted By: westor
Try to use this code, NOT TESTED if you want more help about it please give as an .ini file here to understand 100% what is for.

Code:
ON *!:TEXT:!*:#LATOOC: {
  var %f = $nick $+ .ini
  if ($1 == !register) {
    .notice $nick Registration has started.. Step One: Type !Name (Name of your character)
  }
  if ($1 == !myitems) {
    if ($readini(%f,Register,Complete) != on) { .notice $nick Please Register! !Register | return }
    if ($readini(%f,pass,passaccept) != on) { .notice $nick Login! | return }
    set %Cookie $readini(%f,n,$nick,Cookie)
    set %Tickets $readini(%n,n,$nick,Tickets)
  }
  if ($1 == !pick) {
    if (!$2) { .msg $chan [ $+ $nick $+ ]: Error, Not enough parameters, try again and enter the type and text! | return }
    if ($2 !== type) { .msg $chan [ $+ $nick $+ ]: Error, Incorrect parameter, try again and use $1 type <text> ! | return }
    if ($readini(%f,n,Register,Name) !== on) { .notice $nick Please choose a name !Name (Name) | halt }
    if ($readini(%f,n,Register,Type) == on) { .notice $nick You have already chosen a Type! | halt }
    if ($3 !== Prisoner) && ($3 !== Guard) { .msg $chan [ $+ $nick $+ ]: Error, Incorrect paramater, try again and enter the correct type! (Prisoner or Guard). | return }
    if ($3 == Prisoner) {
      writeini -n $qt(%f) Register Type on
      writeini -n $qt(%f) $nick Type Prisoner
      writeini -n $qt(%f) $nick Health 10
      writeini -n $qt(%f) $nick Tickets 0
    }
    if ($3 == Guard) {
      writeini -n $qt(%f) Register Type on
      writeini -n $qt(%f) $nick Type Guard
      writeini -n $qt(%f) $nick Health 20
      writeini -n $qt(%f) $nick Tickets 0
    }
    .notice $nick Final Step: Pick your password! Type !Pass (Password) You will need this for logging in and keeping track of your character.
  }
  if ($1 == !name) {
    if (!$2) { .msg $chan [ $+ $nick $+ ]: Error, Not enough parameters, try again and enter the nickname! | return }
    if ($readini(%f,n,Register,Name) == on) { .msg $chan [ $+ $nick $+ ]: You are already registered. | return }
    writeini -n $qt(%f) $nick Name $2-
    writeini -n $qt(%f) Register Name on
    .notice $nick Your character name is registered. Step 2: $2- $+ , What is your character type? Type !Types to get a list of what you can be, or to jump right to creation, type !Pick Type (Your selection goes here)
  }
}


That doesn't seem to keep the commands separate as mine had done, but lumps them together. It's why I've been working on them one command at a time, to keep it separated and simple, easier for me to adjust and comb through.

I'm new to this site as well, but just found the "Code" insert part. I'll do that! Thank you.

Joined: Oct 2014
Posts: 42
K
Kooky Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Oct 2014
Posts: 42
Tried it... but once I get past the naming part, and move on to a new selection, it cycles back to the naming.

I'm going to try a mini revamp

Joined: Oct 2014
Posts: 42
K
Kooky Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Oct 2014
Posts: 42
So.. still having issues getting passed the !Pick Type (Selection) part.. it keeps telling me to pick a name.

Code:
on *:text:!Name *:#LATOOC: { 
if ($readini($nick $+ .ini,Register,Name) == on) { notice $nick You already made a name! | halt }
writeini $nick $+ .ini $nick Name $2-
writeini $nick $+ .ini Register Name on
notice $nick Your character name is registered. Step 2: $2- $+ , What is your character type? Type !Types to get a list of what you can be, or to jump right to creation, type !Pick Type (Your selection goes here)
}


  
on 1:TEXT:!Pick Type *:#LATOOC: {
  if ($readini($($+($nick,.ini),2),Register,Name) != on) { /notice $nick Please choose a name !Name (Name) | halt }
  if ($readini($($+($nick,.ini),2),Register,Type) == on) { /notice $nick You have already chosen a Type! | halt }
  if ($3 == Prisoner) {
    writeini $nick $+ .ini $nick Register on 
    writeini $nick $+ .ini $nick Register Type on
    writeini $nick $+ .ini $nick Type Prisoner
    writeini $nick $+ .ini $nick Health 10
    writeini $nick $+ .ini $nick Tickets 0
}    

Joined: Oct 2014
Posts: 42
K
Kooky Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Oct 2014
Posts: 42
Since I'm having such a hard time, would either of you mind if I sent you a message with my coding for some help? I have people bugging me about my scripting on here for me to make them game scripts based off my own.. and it kinda bugs me. I need to focus on my things before I feel comfortable doing anything for anyone else, and a lot of work is going into this.


Link Copied to Clipboard