#<SEL> things in npc_text help

1 messages · Page 1 of 1 (latest)

sand mountain
#

I'm currently adding a npc to B2. I wan't a menu with multiple options when I talk to him. When I talk to Dimmy for exemple, he have <SEL2/1/3> for Buy/Sell/Quit. But What does <SEL2/1/3> mean and how can I create my own with Yes/No

steady thorn
#

But SEL defines options

sand mountain
#

But how does it work

steady thorn
#

let me re-explain it

#

the signature is Common_SelectYN(string: message)

#

returns 1 if Yes, is selected else 0

#

if message is not a string, no text will be rendered

sand mountain
#

Ok it worked

#

Thx

bright skiff
#

I never had it working

steady thorn
bright skiff
sand mountain
#
RunCmd_Map23()
{
    $param0 = "Your text ?";
    $param1 = 1; //Which button is selected by default (0 or 1)
    $local1 = Common_SelectYN($param0, $param1);

    $local2 = set_user_input_lock_state(0); // you can move again

    if not $local1 goto "@000@"h;
    $local2 = TeleportToIsland(); // If yes
"@000@":
    // if No
}```
bright skiff
#

Btw

steady thorn
#

also

bright skiff
#

Bruh didnt see

steady thorn
#

do it like this

bright skiff
#

He cooked with this one

steady thorn
#
RunCmd_Map23()
{
    $local1 = "Your text ?";
    $local2 = 1; //Which button is selected by default (0 or 1)
    $local1 = Common_SelectYN($local, $local2);
    $local1 = set_user_input_lock_state(0); // you can move again

    if not $local1 goto "else"h;
    $local2 = TeleportToIsland(); // If yes
"else":
    // if No
}
steady thorn
steady thorn
#

he wrote to $param which is well no

#

he could've re-used stack slots

#

and he used auto generated labels when unneccessary

#

but atleast it works

bright skiff
steady thorn
bright skiff
#

And it worked

#

Not like me

steady thorn
#

it's pretty decent

#

cooked means great

bright skiff
#

?

bright skiff
steady thorn
#

it has some mistakes

#

but in this specific case

#

those mistakes wont matter

bright skiff
steady thorn
#

that's like adding a hole in a blender but out of sheer luck your specific fruit blocks up the whole

steady thorn
bright skiff
#

Like for me

#

In my case

steady thorn
bright skiff
#

Would it matter

steady thorn
#

I don't remember your code

bright skiff
#

If not local1 go to ...

steady thorn
#

I understand your whole code

bright skiff
steady thorn
#

Ofc it has a goto

#

😭

bright skiff
#

Bruh anyways i will figure this out

bright skiff
#

i think the part with common_select_YN is better

bright skiff
#

even better

steady thorn
#

why aren't you inlining there

bright skiff
#

tell me whats wrong in it pls

steady thorn
bright skiff
#

it did

steady thorn
#

you see the variables $local2 and $local3

bright skiff
#

but

steady thorn
#

instead of doing

bright skiff
steady thorn
#
$local1 = "hi i'm n123";
$local1 = Menu_MessageInfoDraw($local1):
#

just do

#
$local1 = Menu_MessageInfoDraw("hi i'm n123");
steady thorn
bright skiff
bright skiff
bright skiff
#

so

#

$local1 = Common_SelectYN(0, "battle wondernyan (n123)");

#

?

#

is that good?

steady thorn
bright skiff
steady thorn
#

it's (text, defaultOption)

steady thorn
#

it's so peak

#

(Wondernyan)

bright skiff
#

$local1 = Common_SelectYN("n123", 0);

#

is that it?

steady thorn
#

0 is the default anyway

#

so you don't need to put 0

steady thorn
#

or better yet

#
$local1 = Menu_MessageInfoDraw("Wonedrnyan IS peak");
#

dont give them a choice 🗿

bright skiff
#

ill create a base id especially for him

steady thorn
#

🥺

steady thorn
bright skiff
#

his name will be "n123 reference"

steady thorn
#

unless you want Wondernyan S

bright skiff
#

but

#

i dont know how to do for the auras

steady thorn
#

me and younes are the people closest to knowing

#

we just have to figure out one thing

bright skiff
steady thorn
#

that I'm too lazy to do for him

bright skiff
steady thorn
#

unless vry long = 5mins

bright skiff
bright skiff
steady thorn
bright skiff
#

why bruh

steady thorn
#

😭

#

I wasn't making fun of you lol

bright skiff
#

ow mb

#

im tired yk

#

its 7pm

#

6 for u

steady thorn
#

its 6 for me

steady thorn
bright skiff
steady thorn
#

🍵

bright skiff
#

i was in london 2 weeks ago btw

#

is that where u live?

steady thorn
steady thorn
#

jokes aside

#

greater london, yes, london, no

bright skiff
#

it was very cool too

steady thorn
steady thorn
#

😭

bright skiff
#

i was in a 5stars hotel tho

steady thorn
bright skiff
#

W mom

steady thorn
#

😔

#

lol

bright skiff
#

?

steady thorn
#

5-star is a singular adjective

#

a description

#

therefore you don't put an s

bright skiff
steady thorn
#

the same way you would say

#

green star

steady thorn
bright skiff
#

and here star was one

steady thorn
bright skiff
#

bcs it wasnt literally 5stars

steady thorn
#

adjectives are always singular

steady thorn
#

which are both singular AND plural