Soul Engine Ace – Actor Banned Names Script
#1
Soul Engine Ace – Actor Banned Names Script
Author: Soulpour777
Category: Actor / Character Related Script
Type: Snippet


Description:

This script allows you to create a list of Banned Names or Words that allows you to create different effects when a banned word is being entered by the player.

Examples:
1. Scene Name
Say for example you are to let the player rename your character and the name being entered is banned, you can have this script check that so you can then have the player re-enter another name that is not inside the banned names list.

Script Calls:


is_actor_banned?(actor_id)
^ check if the actor’s name is banned. e.g. is_actor_banned?(1)

if you wish to print it out on the console, do a script call: p is_actor_banned?(1)

banned_word?(actor_id, banned_names)
^ use this script call to check if the actor’s name is the specific word.

eg: banned_word?(1, ‘Eric’)

if you wish to print it out on the console, do a script call: p banned_word?(1, ‘Eric’)

Added Script Call for version 2:

$game_system.add_ban_name(name) – if you want to add a banned name in game.

Script:

Code:
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# SEA - Banned Names
# By: Soulpour777
# Version 2.0
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Version 1 - Only allows in script names.
# Version 2 - Allows in game and in script names
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Description: This script allows you to create a list of Banned Names or Words
# that allows you to create different effects when a banned word is being
# entered by the player.
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Examples:
# 1. Scene Name
# Say for example you are to let the player rename your character and the name
# being entered is banned, you can have this script check that so you can then
# have the player re-enter another name that is not inside the banned names
# list.
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script is under Actors / Characters Related Script.
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Script Calls:
#
# Adding A Name:
# $game_system.add_ban_name(name)
# E.g. $game_system.add_ban_name("Eric")
#
# Check if Actor's name is banned:
# is_actor_banned?(actor_id)
# ^ check if the actor's name is banned. e.g. is_actor_banned?(1)
# if you wish to print it out on the console, do a script call: p is_actor_banned?(1)
#
# Check if Actor's Name is Banned with Specific Name
# banned_word?(actor_id, banned_names)
# ^ use this script call to check if the actor's name is the specific word.
# eg: banned_word?(1, 'Eric')
# if you wish to print it out on the console, do a script call: p banned_word?(1, 'Eric')
#
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

module BannedNames
  BannedNamesList = ["Eric", "Joan"]
end

class Game_System

    attr_accessor :curr_banned_names
   
    alias gamesystem_init initialize
    def initialize
      gamesystem_init
      assign_names
    end   
   
    def add_ban_name(name)
      @curr_banned_names.push(name)
    end
   
    def assign_names
      @curr_banned_names = BannedNames::BannedNamesList
    end

end

class Game_Interpreter
  def is_actor_banned?(actor_id)
    for banned_names in $game_system.curr_banned_names
      if banned_names.upcase == $game_actors[actor_id].name.upcase
        $game_switches[BannedNames::SwitchForBannedNames] = true
        return true
      else
        return false
      end
    end
  end

  def banned_word?(actor_id, banned_names)
    if banned_names.upcase == $game_actors[actor_id].name.upcase
      $game_switches[BannedNames::SwitchForBannedNames] = true
      return true
    end
    return false
  end

end
[Image: n6fvBXt.png]
Huhubugin, Bubuuin, Daranasin, Ating tuklasin, Diwa't isip bubuhayin
Mula sa wala, Mundo ay nilikha, Nililok na mukha, Sa siklab ay nagsimula,
Tinanglaw ang palad, Likhang binigyang malay, Sa init, Hugis ang binagay!
Apoy! Mula sa wala, Mundo ay nilikha
Tinanglaw ang palad, Sa apoy hugis ang binagay
[Image: UfhwrmV.png]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
   Longer Script Calls LiTTleDRAgo 0 2,411 05-14-2017, 06:40 PM
Last Post: LiTTleDRAgo
   ELSA (Event Layering Script Advance) JayRay 0 2,634 02-25-2015, 08:34 PM
Last Post: JayRay
   VX Weather Script ccoa 14 44,082 10-28-2014, 07:28 AM
Last Post: DerVVulfman
   Soul Engine Ace – Character Profile Mintyy 0 4,904 03-03-2014, 11:14 PM
Last Post: Mintyy
   Soul Engine Ace – Altitude Changer Mintyy 2 12,125 02-28-2014, 10:04 AM
Last Post: Mintyy
   Soul Engine Ace – Cutscene Screen Mintyy 0 3,598 02-27-2014, 07:57 PM
Last Post: Mintyy
   Victor Engine - Cooperation Skills Victor Sant 2 13,853 02-14-2013, 04:44 PM
Last Post: Ace
   Victor Engine - Toggle Target Victor Sant 0 8,428 01-25-2013, 07:37 AM
Last Post: Victor Sant
   Victor Engine - Leap Attack Victor Sant 0 8,722 12-30-2012, 08:42 PM
Last Post: Victor Sant
   Victor Engine - Counter Options Victor Sant 0 7,982 12-24-2012, 09:48 PM
Last Post: Victor Sant



Users browsing this thread: 1 Guest(s)