interact = [ [ 26, 32, "mountain_village" ], ] npc = [ [14,33,"S", "cool_sword","cool_sword", "none", "magenta_black"] ] map_script = """ if (exists $game_vars{cool_sword} and $game_vars{cool_sword} == 1) { delete $npcs{cool_sword}; } """ [npc_movements] none = ['w'] [objects] mountain_village = "teleport('mountain_village', 8, 44)" cool_sword = """ if (exists $game_vars{cool_sword}) { dialog('',qq(You're not cool enough to pull this sword.\nMaybe the next life? (1/3 chance after all))); } else { my $chance = int rand 3; # maxs at 2; 0, 1, 2 if ($chance == 2) { dialog('Cool Sword',qq(Woah. You're Cool. I'll let you wield me)); item(qq(Cool Sword)); delete $npcs{cool_sword}; $game_vars{cool_sword} = 1; } else { dialog('Cool Sword',qq(You're not Cool. ... This life. Be gone.)); $game_vars{cool_sword} = 0; } } """